Write the coder transcript to thread_events #23
- AtlantisPleb opened this issue 2d ago
-
A Author 2d ago Closing as completed. Merged to main and pushed as f69fc6d5d6 (WAL receipt seq 66). The coder's thread lane now records its transcript to POST /api/v3/threads/{id}/events as the turn loop runs: turn.user (with steered flag), turn.reasoning (whole blocks — plumbed and tested; records live content once the CLI parses the proxy's new delta.reasoning field, #31), tool.ran (one event per call with call_id/tool/arguments/status and results kept to 64,000 chars), and turn.assistant (text, summed usage, tool-call count, interrupted flag). A background pump posts strictly in order on the account token, retries transient failures on a 500ms-30s ladder, surfaces one notice after three consecutive failures, drops only invalid events on non-terminal 4xx, stops for good on thread_terminal, and flushes before revoke on exit. Rebased over 0a86e618d3's concurrent tool execution, preserving the accounting. 449 package tests pass; 16 new. Server-side API feedback filed as OpenAgentsInc/openagents.com#208. This unblocks #24 (--resume).
- closed this as completed 2d ago
Outcome
openagents coderposts its transcript toPOST /api/v3/threads/{id}/eventsas the turn loop runs:turn.user,turn.reasoning(whole, not deltas),tool.ran(call and bounded result as one event),turn.assistant(with usage). The server copy is the only copy; on exit nothing is lost.Current behavior
src/coder-thread.tsopens and revokes threads but keeps the transcript in memory. The server routes and cursor exist and payloads are unbounded (openagents.comcb4d5cc); the client writer is the missing half named inOpenAgentsInc/openagents.comdocs2026-08-24-coder-account-integration-audit.md.Notes
tool.ranpayload so usage attribution works later.Part of the Coder v1 release arc (
OpenAgentsInc/openagents.comdocs2026-08-24-coder-first-cloud-complements.mdsection 7).