Windows cmd.exe truncates multi-line -p args at first newline when
routed through npm .cmd wrappers. Switch to stdin pipe on Windows
so Gemini receives the full task content.
- executor.go: detect isWindows(), use stdin pipe instead of -p
- backend.go: omit -p flag when targetArg is empty (stdin pipe mode)
- main.go: align display logic with new stdin pipe path
- backend_test.go: add tests for empty targetArg behavior
- Binary version: 5.9.0 → 5.10.0
When codeagent-wrapper sets cmd.Dir=$HOME for Gemini backend, Gemini CLI
hangs after emitting init event on long prompts (e.g. with ROLE_FILE
injection). Only the init JSON event is output, then no further events
are produced — causing the wrapper to block indefinitely.
Root cause: Gemini CLI performs directory scanning from CWD. When CWD is
$HOME (which typically contains thousands of files), combined with a
long prompt, Gemini stalls between init and the first user message event.
Fix: Use workDir as CWD for Gemini (same as Claude backend). The
original $HOME workaround was to prevent project .env files from
overriding global API keys (gemini-cli#2493), but this is already
handled by cmd.SetEnv() which injects API keys from
loadMinimalEnvSettings() with higher priority than .env files.
Tested: exact same command that previously hung for 90s+ now completes
in 65-85s with correct output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Output Session-ID to stderr immediately when backend reports
session_started, so Claude can capture it even if task times out
- Fix Command: display line to show actual task text instead of
misleading -p - for Gemini backend (geminiDirect logic)
- Bump codeagent-wrapper 5.8.0 → 5.9.0
- Bump EXPECTED_BINARY_VERSION to 5.9.0
Gemini CLI does not support "-" as stdin marker for the -p flag.
When useStdin=true, the wrapper was passing "-p -" which caused Gemini
to misparse arguments (--include-directories consuming "-" as its value).
Now Gemini backend receives the actual task text via -p directly,
skipping the stdin pipe entirely.
* fix: surface wrapper progress in task output
Propagate the --progress flag through the wrapper runtime path so background Codex tasks emit compact progress lines to stderr. Also enable progress output in long-running CCG command templates and add focused parser/arg coverage for the new behavior.
* fix: address review feedback for task progress output
Remove the unintended progress enablement in runCodexProcess, make progress snippets rune-safe for CJK output, add direct utility coverage, and align the remaining background command templates to use --progress consistently.
- Set cmd.Dir=$HOME for Gemini backend to prevent project .env from
overriding global API keys (gemini-cli#2493)
- Pass project directory via --include-directories flag instead
- Fix pre-existing Codex test env var name (CODEX_REQUIRE_APPROVAL)
- Cross-compile 6 platform binaries with -s -w strip flags