You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(test-classifier): stream agent steps for codex and copilot too (not just claude) (#72)
Live step streaming (⏺/⏎ to the terminal) was claude-only — invoke_codex and
invoke_copilot ignored AI_REVIEW_DO_STREAM and ran quiet, so a copilot/codex user
saw a frozen cursor then only the final report. Now all three stream, each via the
mechanism its CLI actually provides:
• codex: 'codex exec --json' emits a JSONL event stream; new codex_stream_split
narrates command_execution/agent_message/reasoning items to STDERR and emits
only the final agent message to STDOUT (same parse contract as claude).
• copilot: the Copilot CLI has NO structured output for -p mode
(github/copilot-cli#52, open). Use the supported hooks API instead: a
preToolUse command hook fires before each tool call in -p mode and gets the
call as JSON on stdin {timestamp,cwd,toolName,toolArgs}. The hook echoes
'⏎ toolName toolArgs' to STDERR and returns '{}' so copilot proceeds. Hooks
are global-only, so the dispatcher points COPILOT_HOME at a throwaway dir for
the run and removes it after — nothing touches the user's real ~/.copilot.
claude path unchanged. Streaming still gated by should_stream (TTY + not CI +
python3 + not opted out); quiet fallback otherwise.
Tested (CLIs not installed here, so the in-tool run is unverified — see below):
• codex_stream_split on sample --json events → correct ⏺/⏎ + final-only stdout.
• copilot hook script on sample preToolUse payloads (string args, object args,
long-truncation, malformed) → narrates to stderr, returns {}, never crashes.
• bash -n clean; claude path byte-identical.
0 commit comments