deepseek-harness/docs
Tianyi Cui 9f6b96c555 fix(acp): address review of the terminal-card alignment (exit parse, background/error, capability snapshot)
Codex + an independent review pass found three real defects in the prior commit:

1. parseExitStatus could misreport a SUCCESSFUL command as a failure: a clean
   exit 0 appends no marker, so output ending in "[exit code: 5]" (no trailing
   newline) was read as the marker. Anchor the parse to a LEADING newline —
   renderResult always inserts one before a real marker, so a body that merely
   ends in marker-like text no longer matches. A narrow residual (a clean exit 0
   whose final line is exactly the marker) is inherent to the replay-only-sees-
   text design and documented; the complete fix (a structured exit on the event)
   is the RFC's named escape hatch.

2. A run_in_background start and an isError result were rendered as exited
   terminal cards with a false exit-0 pill. A background start returns a task-id
   ack (not a streamed terminal) and is no longer marked terminal; an isError
   result (spawn failure / abort) carries no exit pill.

3. The terminal capability was re-read live on the result path, so a second
   initialize between a call and its result could desync them (orphan
   terminal_output or clobbered card). Snapshot the capability per session at
   creation (SessionRecord.terminalEnabled) so call and result always agree.

Also reword the reference-parity claim: keeping the description as a content
block in terminal mode is a DELIBERATE divergence (claude-agent-acp drops it).
Tests added for each; with-key e2e still green.
2026-06-18 19:35:15 +08:00
..
cookbook Merge remote-tracking branch 'origin/master' into feat/acp-2-bridge 2026-06-18 03:31:04 +08:00
postmortem fix(acp): address Codex review — strict ctx.get, correct fiber-ownership doc + test 2026-06-18 03:48:33 +08:00
rfc fix(acp): address review of the terminal-card alignment (exit parse, background/error, capability snapshot) 2026-06-18 19:35:15 +08:00
AGENTS.md docs: unify ADR/RFC trees into one lifecycle-organized RFC tree 2026-06-18 02:18:24 +08:00
architecture.md Merge remote-tracking branch 'origin/master' into feat/acp-2-bridge 2026-06-18 03:31:04 +08:00
development.md Merge remote-tracking branch 'origin/master' into worktree-md-wrap-guard 2026-06-16 23:38:58 +08:00
module-graph.md feat(acp): tool-owned tool-call UI presentation (title/command/output) 2026-06-18 09:01:36 +08:00