Files
ccg-workflow/codeagent-wrapper
AliangandClaude Opus 4.6 a8377c4a4e fix: Gemini CLI hangs on long prompts when CWD is $HOME
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>
2026-03-29 19:09:25 +08:00
..
2026-01-16 15:22:27 +08:00
2026-01-05 01:28:10 +08:00
2026-01-05 01:28:10 +08:00