multica/server/pkg/agent
yushen 828b75c76d fix(daemon): resolve codex app-server deadlock after turn completion
The codex backend spawns a long-running app-server process that doesn't
exit after completing a turn. The lifecycle goroutine was waiting on
<-readerDone which blocks on scanner.Scan() until stdout closes — but
stdout never closes because the process stays alive. This caused the
entire poll loop to freeze, preventing any further task processing.

Fix: explicitly close stdin and cancel the context after the turn
completes, which terminates the codex process and unblocks the reader.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:37:52 +08:00
..
agent.go feat(daemon): unified agent SDK supporting Claude Code and Codex 2026-03-24 14:05:03 +08:00
agent_test.go fix(agent): fix data races, add tests, and fix raw protocol detection 2026-03-24 14:21:10 +08:00
claude.go fix(agent): fix data races, add tests, and fix raw protocol detection 2026-03-24 14:21:10 +08:00
claude_test.go fix(agent): fix data races, add tests, and fix raw protocol detection 2026-03-24 14:21:10 +08:00
codex.go fix(daemon): resolve codex app-server deadlock after turn completion 2026-03-24 17:37:52 +08:00
codex_test.go fix(agent): fix data races, add tests, and fix raw protocol detection 2026-03-24 14:21:10 +08:00