Claude Code stream-json output adapter (HarnessOutput) #220

Closed
opened 2026-10-27 13:35:26 +00:00 by sam · 0 comments
Owner

Implement agentexec.HarnessOutput for Claude Code's headless --output-format stream-json (with --verbose): report each completed tool call (tool name, clipped result, failed flag) through the ToolCallReporter, capture session_id, and sum usage (input, output, cache read, cache creation tokens) into agentexec.Usage. Pure parser over recorded fixture streams in testdata; unknown event types are ignored, a malformed line never panics or stops the stream. New file internal/agentexec/harness_output_claude.go plus tests; touch nothing else. See docs/prds/external-agent-harness.md (Contract) and internal/agentexec/harness_runner.go (HarnessOutput).

Close reason

Closed


Imported from beads archie-core-egkf.10 · GitHub #1185 · type task · priority P1 · created 2026-09-25 · closed 2026-09-25

Implement agentexec.HarnessOutput for Claude Code's headless --output-format stream-json (with --verbose): report each completed tool call (tool name, clipped result, failed flag) through the ToolCallReporter, capture session_id, and sum usage (input, output, cache read, cache creation tokens) into agentexec.Usage. Pure parser over recorded fixture streams in testdata; unknown event types are ignored, a malformed line never panics or stops the stream. New file internal/agentexec/harness_output_claude.go plus tests; touch nothing else. See docs/prds/external-agent-harness.md (Contract) and internal/agentexec/harness_runner.go (HarnessOutput). ### Close reason Closed --- _Imported from beads `archie-core-egkf.10` · GitHub #1185 · type task · priority P1 · created 2026-09-25 · closed 2026-09-25_
sam added the hightask labels 2026-10-27 13:35:26 +00:00
sam self-assigned this 2026-10-27 13:35:26 +00:00
sam closed this issue 2026-10-27 13:35:26 +00:00
sam added a new dependency 2026-11-14 14:45:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#220