Restore state-backed tool call IDs - #617
Conversation
Emit queueDepth and activeCount every 15s with metric=freebuff_waiting_room so the waiting line length and concurrent admitted users can be charted over time from the log stream. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PREFILL_QUEUE_DEGRADED_MS was lowered to 200 in 59640d5, so the "healthy baseline" fixtures using p50=300 now classify as degraded. Drop them to 150 to keep the healthy-path tests meaningful. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deep-thinking models (Minimax M2.5, Kimi K2.5, GLM-5.1, GPT-5) can spend 15+ minutes in the reasoning phase before emitting the first token. The 10-min headersTimeout was cutting them off mid-think and surfacing as "Agent run error: The operation timed out." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Decouples the user-facing wait estimate from the admission tick rate. The estimate is now a rough one-minute-per-spot rule of thumb, which reads more intuitively in the CLI than a tick-derived number that shifts with deployment cadence. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Opus 4.7's tokenizer differs from most models; using 4.6 gives more representative counts for open-source models routed through the Anthropic count_tokens endpoint. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The core of this PR — reintroducing What's concerning is that
Neither of these is mentioned in the PR description, and there's no test covering the new unconditional overwrite of Please split the spawn-agent normalization change into its own PR with its own tests and description so each change can be evaluated (and reverted, if needed) independently. The tool-call-id work itself looks portable once separated. |
9361c1b to
1f5ce3c
Compare
Summary
functions.<tool>.<index>shape with a run/session-backed monotonic counter.Validation
bun test packages/agent-runtime/src/util/__tests__/tool-call-id.test.ts packages/agent-runtime/src/__tests__/run-programmatic-step.test.ts packages/agent-runtime/src/__tests__/tool-validation-error.test.tsbun run --cwd packages/agent-runtime typecheckbun run --cwd common typecheckbun run --cwd packages/agent-runtime testNODE_ENV=production bun test cli/src/utils/__tests__/sdk-event-handlers.test.ts cli/src/utils/__tests__/message-block-helpers.test.ts cli/src/utils/__tests__/send-message-helpers.test.tsbun run --cwd cli typecheckbun run --cwd cli src/index.tsx --help