Agent reliability · 2026-11-13
Correctness beyond a successful response
An HTTP 200 and valid JSON are not enough. Agent workloads need complete streams, correct tool arguments and faithful protocol behavior, so every fix here comes with a controlled comparison.

The arguments leaked into the arguments
In long, multi-turn coding sessions, a small fraction of tool calls came back broken: the model wrote its own end-of-argument marker into the argument text. The cause was a worker setting that applied full constrained decoding to every request that carried tools. We reproduced it by replaying real sessions from three clients (Claude Code, Codex and opencode) and changed exactly one switch on the same worker.
After the change, 467 tool calls in our own real sessions produced zero leaks and zero regressions. For forced tool calls (a named function or required), we now constrain decoding to the function's argument schema instead of generic JSON; auto is unchanged. Empty-argument failures fell from 97 to 0 and Pass@1 rose from 87.4% to 92.6%.
Guards that stay on
- Degeneration loop guard. If more than 98% of the last 2,048 tokens are short repeated fragments, generation ends with
length. In the canary it truncated 2 of 32 runs. - Control-token injection guard. Control-token spellings inside user text are encoded as plain text. End and tool markers take effect only by token ID.
- A reference oracle. The same batch of requests is compared token by token against the official open-source reference implementation.
Protocol details break agents too
The same round of work fixed four compatibility problems that never showed up as errors on a health check:
- Segmented thinking content sent to the engine as an array failed from the second turn on.
- The gateway dropped the thinking-effort field.
- Clients that send no output budget now get a default reservation of min(32K, remaining context).
- A hosted search tool that some clients include by default caused requests to be rejected.
Seven interface patches for Kimi-K3
| Symptom | How we measured it | Fix |
|---|---|---|
| With thinking off and temperature 1.0, about 10% of auto calls skip the tool | 60 runs: 54/60 at 1.0 · 59/60 at 0.6 · 60/60 at 0 | Default temperature 0.6 when thinking is off and none is given |
| Thinking on without an effort often answers in text instead of calling tools | 36 runs: unspecified 30/36 · high 36/36 (half the tokens) | Default thinking effort = high |
| Named-function tool_choice reports finish_reason stop | One of the 34 official tests | Report tool_calls when calls are present |
| Small output budgets are eaten by thinking, no answer | 64-token budget case | Thinking capped at half the total budget |
| OpenAI / Anthropic effort names not recognized | Messages / Responses cases | Map to the nearest K3 level |
| Prompt cache hits not reported | Cache case | Enable prompt token details |
| Invalid role returns 200 | One of 18 cross-model tests | Use the official encoder |
Official interface tests went from 24/34 to 34/34; cross-model tests from 17/18 to 18/18; team acceptance passed four rounds in a row. All patches are in the interface layer; the model is untouched.
Thinking effort, and how to call us
| Effort | AIME 24+25 | Note |
|---|---|---|
| 50 (before alignment) | 97.9% | — |
| 75 (high / xhigh) | 99.6% | Default when thinking is on without a level |
| 100 (max) | 99.6% | About 18% more output tokens |
- Give enough output budget. Reasoning is 76–82% of output; set
max_tokensto at least 4K–8K. - Read
tool_calls. When a function is named, calls always come back astool_calls. - Stream for agents. A non-streaming response cut off before a tool block closes can lose completed calls.
- Retry with Retry-After. Overload returns a retry hint; honor it.
Drill failures before designing for them
| Drill (before the rework) | What happened | What we run now |
|---|---|---|
| 2× overload for 5 minutes | All 523 requests returned 200; first token 17 → 148 s; health checks stayed green | Concurrency cap at the measured knee; queue cap = first-token SLO − cold prefill |
| Kill a worker | 7 streams cut after 200, with no [DONE] and no error | Primary/standby gateways; switch after 3 failed checks; actual gap 0.28–0.49 s |
| Pause for 60 s | One stream silently stalled for 70 s | 60 s inter-token timeout; first-token timeout grows with uncached length |
| Client disconnects | Worker released within 7 s | Retry once on another node only if no bytes were sent |
Lesson: HTTP 200 is not a pass. A server must recognize a truncated stream and enforce an inter-token timeout.
Data & sources
| Test | Observed result | Scope |
|---|---|---|
| Tool-argument leaks | 4.7% → 0 | Real sessions, one setting changed, Oct 15 |
| Empty-argument failures | 97 → 0 | BFCL forced calls, 1,600 per arm |
| Official interface tests (K3) | 24/34 → 34/34 | After seven interface-layer patches |
October 2026 engineering measurements on the stated hardware and workload. They are not a cross-model ranking or a service-level guarantee.
This work runs underneath Zenith Tokens.
Try Zenith Tokens