Repository navigation
KlaatCode V2.4.1
Three field-reported failures where the agent looked like it was working but silently did nothing — fixed. Plus CI automation, self-verification, and time travel.
Requires the Klaatu gateway deployed 2026-08-03 or later for the server half of the tool-call XML fix and the timeout guards. Check with
curl https://api.klaatai.com/health— thebuildfield now reports the serving commit.
Fixed
Raw <tool_call> XML no longer shows up as the answer
Some cheap-tier models emit tool calls as literal <tool_call><function=write_file>… text instead of a real tool call. That XML used to stream straight into the transcript as if it were the reply — and if the stream dropped before the block finished, the turn ended with raw markup on screen and nothing executed. Output is now withheld the moment a tool-call opener appears (including openers split across tokens), and only the safe remainder is released. The server still parses the block into a real tool call, so the work actually runs.
"I'll fix it now" no longer ends the turn without doing anything
A round that announced work but called zero tools was treated as the final answer — so the agent would promise a fix, stop, and repeat the same promise every time you re-asked. Those rounds are now detected and nudged to act (up to twice per turn), and the model is reported to routing health so the router learns which models narrate instead of working. Skipped in plan mode and when the message ends in a question (a genuine hand-off to you).
Mid-stream stalls no longer hang the turn forever
A silent stall — socket open, zero bytes, a load balancer holding the connection — left the client waiting indefinitely with no spinner progress and no way out but Ctrl+C. An idle watchdog now catches it, preserves whatever already streamed, and auto-retries once.
Timeout and dropped-connection UX
No more raw red Error: Timed out waiting for the model to respond. Transient drops retry once silently; if it still fails, partial output is kept and your message goes back in the composer for a one-key resend.
Also: weak-model "I can't run commands" denials are now caught and reported; clipboard image paste works on emulators that swallow ctrl+v (new /paste).
Added
Headless exec contract — klaatai run for CI
A real agentic loop with a machine-facing contract:
--json— JSONL event stream (start/tool/turn/cost/result)--output-schema <file>— final answer validated against a JSON Schema, one corrective retry--allow-tools <spec>— bound autonomy by category or explicit tool name--max-turns/--max-cost— hard caps- Exit codes:
0ok ·1auth/error ·2task failed ·3cost cap ·4needed approval
Ships a composite GitHub Action that passes the API key by env only, so it can't leak into process listings or tool output.
Proof of work — /verify
The agent can prove an edit works instead of claiming it. Detects your typecheck and test commands (Bun/Vitest/Jest/pytest/Go/Cargo/npm) and posts a receipt: ✓ Verified — ✓ typecheck · ✓ Bun. Auto mode (/verify auto) correlates failures with the files the turn actually touched, so a repo with pre-existing errors reads as "your changes look clean" instead of blaming your edit.
Time travel — /rewind or Esc-Esc
Fork the conversation at any earlier message. Files the rewound turns modified are restored to their pre-turn state, new files are removed, and the session is rewritten so --resume follows the new branch. Your original message lands back in the input for editing.
Upgrading
klaatcode --version # should report 2.4.1