docs(plans): fold 22 adapter wire-truth findings into chat-harness-adapters

Merged
SA
4mo ago
+50-11

Amends the adapter plan with measured reality from both recorded adapters (#6193, #6194): §6a Codex findings (no capability advertisement — version gate; availableDecisions-driven approvals; dual diff formats; interrupt dangling items; turn/start race), §3 Claude corrections (allowedTools shadows canUseTool; updatedInput required on accept; abort as thrown error; Agent/Task naming), and the semantic-vs-telemetry notice rule both adapters independently required. Merges cleanly now; fully coherent once #6167 lands.

https://claude.ai/code/session_01XRFCEPsfmJHu2SenDKYJ2h


Summary by cubic

Updates the chat-harness adapter plan with recorded wire truth from Claude and Codex. Clarifies mapping, approvals behavior, and version gating, and reduces notice noise by separating semantic events from telemetry.

  • Refactors
    • Split “unmapped vs ignored”: semantic events become notice; enumerated telemetry is ignored via a named per-adapter list.
    • Claude corrections: capabilities can be null; subagent tool named Agent (alias with Task); allowedTools shadows canUseTool; accept must include updatedInput; aborts surface as thrown iterator errors; thinking/text settle as separate blocks; bash results lack exitCode.
    • Codex wire truth (new §6a): enforce a minimum version parsed from userAgent (cross-check thread.cliVersion); drive approvals from availableDecisions; tolerate server frames without jsonrpc; treat commandActions as hints; handle two diff formats (add vs update) with hunk-local reconstruction; mix of seconds/ms timestamps; no per-thread mode setter (map to permission levels); close dangling items on interrupt; guard the turn/start response vs notifications race; note weak mapping for item/plan/delta.
    • Testing note: Claude approvals have no wire representation, so fixtures cover mapping only; live smoke tests cover approvals. Codex approvals are captured in recordings.

Summary by CodeRabbit

  • Documentation
    • Clarified event mapping for semantic unmapped events and telemetry.
    • Documented capabilities, message identifiers, subagents, approvals, tool outputs, aborts, and missing exit codes.
    • Added Codex integration findings covering approval replay, version handling, wire-format variations, file changes, timestamps, permissions, interruptions, and plan updates.
    • Recorded known approval coverage limitations and edge cases.