@0perator/operator 0.1.62 → 0.1.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +1035 -0
  2. package/LICENSE +19 -0
  3. package/dist/acp/agent.js +103 -0
  4. package/dist/acp/run.js +23 -0
  5. package/dist/auth/client.js +4 -1
  6. package/dist/auth/login-intent.js +12 -0
  7. package/dist/autonomy/board-run.js +65 -0
  8. package/dist/autonomy/board.js +83 -0
  9. package/dist/autonomy/dream.js +71 -0
  10. package/dist/autonomy/headless.js +70 -0
  11. package/dist/autonomy/index.js +260 -0
  12. package/dist/autonomy/keepawake.js +84 -0
  13. package/dist/autonomy/loop.js +82 -0
  14. package/dist/autonomy/reporter.js +54 -0
  15. package/dist/autonomy/routine-run.js +25 -0
  16. package/dist/autonomy/routines.js +173 -0
  17. package/dist/autonomy/session-factory.js +61 -0
  18. package/dist/background/index.js +275 -20
  19. package/dist/background/worktree.js +62 -0
  20. package/dist/cli.js +518 -95
  21. package/dist/config/brand.js +81 -0
  22. package/dist/config/operator-harness.js +86 -0
  23. package/dist/config/persona.js +174 -0
  24. package/dist/config/settings.js +98 -9
  25. package/dist/engine/agent.js +447 -51
  26. package/dist/engine/aurora.js +180 -64
  27. package/dist/engine/compaction.js +97 -5
  28. package/dist/engine/grandmaster.js +69 -10
  29. package/dist/engine/router-adapter.js +3 -0
  30. package/dist/engine/selfheal.js +35 -0
  31. package/dist/engine/verify-gate.js +81 -0
  32. package/dist/mcp/index.js +1 -1
  33. package/dist/permissions/index.js +13 -7
  34. package/dist/router/models.js +1 -1
  35. package/dist/router/router.js +46 -7
  36. package/dist/selfimprove/index.js +88 -0
  37. package/dist/services/preflight.js +42 -1
  38. package/dist/session.js +239 -22
  39. package/dist/telemetry/events.js +9 -0
  40. package/dist/tools/executor.js +62 -24
  41. package/dist/tools/git-status.js +71 -0
  42. package/dist/tools/mutating.js +9 -0
  43. package/dist/tools/registry.js +247 -26
  44. package/dist/tools/result-cap.js +23 -0
  45. package/dist/tools/searxng.js +42 -2
  46. package/dist/tools/shell-context.js +17 -0
  47. package/dist/ui/ActivitySpinner.js +6 -5
  48. package/dist/ui/App.js +23 -5
  49. package/dist/ui/AuthScreen.js +1 -1
  50. package/dist/ui/BgPanel.js +60 -5
  51. package/dist/ui/Composer.js +135 -13
  52. package/dist/ui/Header.js +6 -4
  53. package/dist/ui/InputRule.js +2 -1
  54. package/dist/ui/Markdown.js +69 -10
  55. package/dist/ui/Masthead.js +6 -4
  56. package/dist/ui/PlanPane.js +23 -0
  57. package/dist/ui/QuestionPrompt.js +22 -8
  58. package/dist/ui/StatsCard.js +15 -0
  59. package/dist/ui/StatusRule.js +13 -4
  60. package/dist/ui/SummaryCard.js +18 -0
  61. package/dist/ui/Table.js +114 -0
  62. package/dist/ui/ThinkingSpinner.js +6 -4
  63. package/dist/ui/ToolBatch.js +12 -0
  64. package/dist/ui/ToolStep.js +12 -4
  65. package/dist/ui/Transcript.js +30 -6
  66. package/dist/ui/chart.js +34 -0
  67. package/dist/ui/editdiff.js +84 -0
  68. package/dist/ui/highlight.js +89 -0
  69. package/dist/ui/osc.js +32 -0
  70. package/dist/ui/planExit.js +26 -0
  71. package/dist/ui/term.js +16 -0
  72. package/dist/ui/theme.js +60 -0
  73. package/dist/ui/tree.js +71 -0
  74. package/dist/util/slash.js +15 -0
  75. package/dist/util/throttle.js +28 -0
  76. package/package.json +11 -2
package/CHANGELOG.md CHANGED
@@ -4,6 +4,1041 @@ Operator is AXE's terminal coding agent (npm `@0perator/operator`), running on A
4
4
  Newest first. Every release bumps `src/cli.tsx` VERSION + `package.json`, adds an entry here, and ships to
5
5
  npm + both git remotes (memjar/kode, axetechnologies/kode). Test counts are the full suite at that release.
6
6
 
7
+ ## 0.1.154 — 2026-09-29 — engine: per-session persistent shell (sandboxed-exec Phase 1)
8
+ - The `bash`/`shell_exec` persistent shell is now **per session**, not one process-wide singleton. Before, the
9
+ foreground and every background sub-agent shared ONE bash: a sub-agent's `cd`/`export` corrupted the
10
+ foreground's cwd/env (and vice versa — proven live on JL1), and every command head-of-line-blocked every other
11
+ session on the one FIFO. Now the `Executor` carries a stable per-session `shellKey` (the session's `sessionId`,
12
+ else a unique `exec-N` fallback so two keyless lanes never collide) through tool execution via an
13
+ `AsyncLocalStorage`; the registry keys `ShellSession` by it, and a sub-agent disposes its shell on completion.
14
+ Default (`KODE_SANDBOX=off`) behavior is **byte-identical** — this is the correctness fix + prerequisite for
15
+ the sandboxed-exec tiers, no sandbox change yet. Design + JL1 validation:
16
+ `_ai-docs/architecture/sandboxed-code-execution.md`; decision: `_ai-docs/decisions/2026-09-29-per-session-shell.md`.
17
+ Suite 699 green (+5). Also: releases now publish to **npmjs** (private) instead of pkg.axe.onl (`publishConfig`).
18
+
19
+ ## 0.1.153 — 2026-09-29 — speed: KV prefix-cache reuse (`cache_prompt: true`) — fixes slow compaction
20
+ - Every Aurora request now sends `cache_prompt: true`. Without it the single-slot llama.cpp server RE-PREFILLED
21
+ the whole growing prefix (system + tools + history) each round, and re-prefilled the full evicted span on every
22
+ compaction — the "compaction takes 4-5 min at ~80k ctx" symptom seen live on JL2. With it the server
23
+ prefix-matches the cached KV and prefills only the new tail (minutes → seconds on deep-context rounds).
24
+ Harmless on servers that ignore the field. Rationale: `_ai-docs/2026-09-29-prefix-cache-reuse.md`. Suite 694 green.
25
+
26
+ ## 0.1.152 — 2026-09-28 — engine: per-turn token budget (opt-in cost ceiling)
27
+ - New `maxTurnTokens` (env `KODE_TURN_MAX_TOKENS`), an **opt-in** per-turn ceiling on total tokens (generation +
28
+ prefill, summed across the turn's rounds). When a turn has spent its budget it **wraps up gracefully at the
29
+ next round boundary** with a `[paused — token budget …]` note — never mid-round, so a productive turn finishes
30
+ its current step first and returns the work so far. Default off (the round + no-progress guards already bound
31
+ runaway; this adds a cost axis for cost-sensitive / unattended runs). The `[paused —` prefix (vs `[stopped —`)
32
+ keeps the flywheel from misreading a budget stop as a failure-lesson. Completes the four-item frontier list
33
+ (loop recovery, flywheel, spawn heuristic, cost budget). Rationale: `_ai-docs/2026-09-28-per-turn-token-budget.md`.
34
+ Suite 694 green (+2).
35
+
36
+ ## 0.1.151 — 2026-09-28 — sub-agent spawn heuristic (accurate post-gate) + JL1 E2E battery
37
+ - Updated the `spawn_agent` tool description to match the endpoint gate's reality: sub-agents SHARE your one
38
+ model endpoint and the gate keeps YOUR turn first and runs them **one at a time in the gaps** (not truly in
39
+ parallel), so spawning many does not make them finish sooner. Added an explicit rule: **never `sleep`, poll,
40
+ or block to WAIT** for a sub-agent — its result posts on its own; `agent_status` is for CHECKING state, not a
41
+ wait loop (this was the observed antipattern: `sleep 60` to pass time). Guides the model to a better spawn
42
+ decision now that contention is handled structurally. Plus the JL1 E2E battery for 0.1.147–0.1.150
43
+ (`_ai-docs/2026-09-28-jl1-test-battery.md`): checkpoint-un-hang (59ms over a `sleep 999` hook), gate priority,
44
+ flywheel sink, and a real headless turn — all PASS on the shipped runtime. Suite 692 green.
45
+
46
+ ## 0.1.150 — 2026-09-28 — self-improvement: flywheel closed loop (auto-capture failure lessons)
47
+ - The self-improvement `memory` sink is now implemented (was "next increment"). When a turn ends **STUCK** — a
48
+ loop/guard stop or a `repetition` stopReason — a concise, deduplicated **LESSON** is appended to the repo's
49
+ `.operator/memories.md`, which `persona.loadMemories()` injects into every future session's system prompt
50
+ here. So a failure the agent hit once becomes durable, always-loaded context — it doesn't repeat the trap.
51
+ Deterministic (no LLM pass, zero added latency); **opt-in** (`settings.selfImprove.memory`, default off, since
52
+ it writes into the repo); deduplicated; best-effort. Closes the loop that the forced-redirect recovery
53
+ (0.1.149) opened in-session. Rationale: `_ai-docs/2026-09-28-flywheel-memory-closed-loop.md`. Suite 692 green (+4).
54
+
55
+ ## 0.1.149 — 2026-09-28 — engine: loop recovery — forced redirect instead of stopping (longer autonomous sessions)
56
+ - The round-loop guard used to hard-STOP the turn at 6 identical rounds. Now it ESCALATES to self-correction: at
57
+ 3 repeats a light nudge; at 6 a **forced redirect** — the model must diagnose what it keeps doing and why it
58
+ isn't progressing, then **break the step down** or **switch approach**, and it gets a fresh runway and
59
+ CONTINUES. Only after `CONTENT_LOOP_REDIRECT_MAX` (3) forced redirects fail does the turn hand back — so the
60
+ runway before a stop extends from ~6 rounds to ~18+ of active self-correction (the no-progress stall + round
61
+ ceiling still backstop it). Keeps long autonomous sessions alive instead of dying on a recoverable loop.
62
+ Rationale: `_ai-docs/2026-09-28-loop-forced-redirect-recovery.md`. Suite 688 green (+1).
63
+
64
+ ## 0.1.148 — 2026-09-28 — reliability: un-hangable tools (checkpoint freeze + esc-always-works)
65
+ - A checkpoint could freeze the session forever ("checkpoint… spins, esc won't help") — its git steps ran with
66
+ no timeout, no kill signal, and an interactive-capable env, so a slow/hung pre-commit hook, a credential
67
+ prompt, an editor/pager, or a stuck index lock blocked git and the tool never returned. **Two fixes:**
68
+ (1) checkpoint's git is hardened — every step has a **timeout + SIGKILL**, a **non-interactive env**
69
+ (`GIT_TERMINAL_PROMPT=0`, `GIT_EDITOR`/`GIT_SEQUENCE_EDITOR=true`, `GIT_PAGER=cat`, `GIT_OPTIONAL_LOCKS=0`),
70
+ and commit uses **`--no-verify`** (a WIP snapshot must never be gated by a hook); it now always returns, with a
71
+ clear message on timeout. (2) **Systemic guard:** the turn loop races every tool batch against the abort
72
+ signal (new `abortable()`), so **esc ALWAYS returns control** even if a tool's child process is wedged — no
73
+ single tool can freeze the session again. The abandoned work runs to its own timeout; the session never
74
+ freezes. Rationale: `_ai-docs/2026-09-28-un-hangable-tools-checkpoint.md`. Suite 687 green (+5).
75
+
76
+ ## 0.1.147 — 2026-09-28 — engine: endpoint concurrency gate (share one slot, interactive-first)
77
+ - Aurora is ONE decode slot (llama.cpp `--parallel 1`). Nothing serialized the main turn and its spawned
78
+ sub-agents, so they time-sliced that slot — N agents at ~1/N speed, and an interactive prompt could wait
79
+ behind a sub-agent's rounds. Measured live: a **61-min / 60-round** bug-fix loop that stopped on the self-loop
80
+ guard, then a **4-minute** wait on a trivial follow-up prompt, both because sub-agents were contending for the
81
+ one slot. New **per-endpoint concurrency gate** in the transport (`aurora.ts`) serializes requests per base
82
+ URL to `KODE_ENDPOINT_SLOTS` (default 1) and gives the **interactive main turn priority** over background
83
+ sub-agents: a waiting main request jumps the queue ahead of sub-agents, and a background request never claims
84
+ a freed slot while a main one waits. Same total throughput, no thrash, the user's turn is never starved —
85
+ sub-agents run at full speed one at a time and actually finish instead of all crawling. **Vendor-neutral /
86
+ AI-agnostic:** keyed by base URL, so it re-applies to any OpenAI-compatible endpoint at its own capacity; it
87
+ knows nothing about which model answers. The `background` flag is threaded structurally (spawn_agent
88
+ sub-agents → SessionCfg → runTurn → the gate), not inferred. Rationale + fleet data:
89
+ `_ai-docs/2026-09-28-endpoint-concurrency-gate.md`. Suite 682 green (+5).
90
+
91
+ ## 0.1.146 — 2026-09-28 — remote: RC auto-start feature-flagged to admin/VIP tier
92
+ - `remote.autostart` now defaults **ON for the admin/VIP tier** (`permissions.tier: "admin"`) and OFF for
93
+ everyone else — instead of the 0.1.145 opt-in-off default. An explicit `remote.autostart:true|false` /
94
+ `KODE_RC_AUTOSTART=1|0` still overrides the tier gate on that box. Owner decision (James, 2026-09-28):
95
+ gate always-on remote sessions to VIP for now and widen the flag later, since a session that still stops on
96
+ a solvable bug isn't ready to be a broadly-shared attachable surface. Suite 675 green.
97
+
98
+ ## 0.1.145 — 2026-09-28 — remote: opt-in RC host auto-start on boot (default OFF)
99
+ - New `remote.autostart` (env `KODE_RC_AUTOSTART`), **default OFF** — when on, a Remote Control host comes up on
100
+ session boot so the owner can attach from phone/desktop without typing `/remotecontrol` on the box first.
101
+ Reuses the exact `/remotecontrol` connect path (submitRef → handleSlash), no second implementation to drift.
102
+ Token-gated with a **silent** skip when this box isn't signed in (never spams the sign-in hint every launch),
103
+ never double-starts a live host, and runs only after a healthy boot; `/remotecontrol` still toggles it off.
104
+ Default-ON stays an explicit owner choice — making every session remote-attachable is a posture change.
105
+ Rationale + the operator-tsi token-durability dependency:
106
+ `_ai-docs/2026-09-28-remote-control-autostart.md`. Suite 675 green (+6).
107
+
108
+ ## 0.1.144 — 2026-09-28 — searxng: honest ✓ status in the masthead + /services
109
+ - The boot service line and `/services` now report SearXNG's **real** state instead of a hardcoded "lazy". Boot
110
+ probes reachability read-only (never starts a container): shows **searxng ✓** when a backend is already up (an
111
+ explicit `KODE_SEARXNG_URL`, or a container still running from a prior session's `--restart unless-stopped`),
112
+ else **lazy** — it still starts on the first `web_search`, as before. `/services` distinguishes **✓ active**
113
+ (served a search this session) from **✓ up** (reachable but unused) from **lazy**. New `searxng.ts` exports
114
+ `searxngStatus()` + `probeSearxng()`; the session activation flag is set by the existing `noteSearxngUsed()`
115
+ hook (fires on a non-empty SearXNG result, registry.ts:474). No change to search behavior. Suite 669 green (+2).
116
+
117
+ ## 0.1.143 — 2026-09-28 — speed: absolute-token compaction ceiling (big window / small hardware)
118
+ - New `compaction.ceilingTokens` (env `KODE_COMPACTION_CEILING_TOKENS`) — compact once the request reaches **N
119
+ absolute tokens**, regardless of the window-fraction `threshold`. The fraction knob is clamped ≥0.3, which on a
120
+ 300K Aurora is 90k tokens — but decode is bandwidth-bound on **absolute** context depth, so a laptop already
121
+ crawls (~18 tok/s) by ~27k. Measured on the fleet: Aurora does 55–58 tok/s fresh, ~18 (laptop) / ~39 (Studio)
122
+ at ~27k, ~20 (Studio) by 45k. This lever caps working context for speed where the fraction knob can't reach.
123
+ Recommended ~40–60k on a Mac Studio, ~20–30k on a laptop to hold >30 tok/s.
124
+ - **Soft / proactive-only:** the ceiling triggers proactive compaction (`shouldProactivelyCompact`) but is kept
125
+ out of `needsCompaction`, so the over-window circuit breaker only ever tests the real KV window — an
126
+ unsatisfiably-low ceiling can never "stop" a turn. Validated floor 8000 (below that it thrashes; system+tools
127
+ ≈5k); unset = no ceiling (default behavior unchanged). Wired through CLI, headless, and ACP surfaces
128
+ identically. Rationale + fleet data: `_ai-docs/2026-09-28-compaction-absolute-token-ceiling.md`. Suite: 667 green.
129
+
130
+ ## 0.1.142 — 2026-09-28 — fast-by-default: compaction threshold 0.85 → 0.7
131
+ - The proactive-compaction default drops from 0.85 to **0.7** of the context window, so EVERY install compacts
132
+ sooner and keeps the live context small — holding generation near full speed on long sessions instead of
133
+ crawling into the slow high-context zone (measured: ~5 tok/s at ~200k vs ~56 fresh). Previously this speedup
134
+ required manually setting `compaction.threshold`; now it ships on by default. Override via
135
+ `compaction.threshold` / `KODE_COMPACTION_THRESHOLD` (clamped [0.3, 0.95]) — set higher to keep more raw
136
+ context, lower for more aggressive speed. Trade-off: summarizes a little earlier. Suite green.
137
+
138
+ ## 0.1.141 — 2026-09-28 — speed: Aurora serving guidance (ngram-mod spec-decode)
139
+ - Serving/ops guidance (no engine code change): run Aurora's llama-server with **`--spec-type ngram-mod
140
+ --spec-ngram-mod-n-min 3 --spec-ngram-mod-n-max 8 --spec-ngram-mod-n-match 24`** for a measured **+84% on
141
+ code re-emission with 0% penalty on novel or mixed output**. It's a no-draft-model, vocab-agnostic ngram
142
+ speculative decode; the adaptive `ngram-mod` mode is free-on-miss, unlike `ngram-cache`/`ngram-simple`
143
+ defaults which were net-NEGATIVE (−21% prose, −35% on a realistic edit turn). Full A/B + rationale in
144
+ `_ai-docs/2026-09-28-aurora-ngram-spec-decode.md`.
145
+ - Pairs with 0.1.140's `compaction.threshold`: keep the live context small (high base tok/s) AND draft the
146
+ repeated spans (ngram-mod) — the two levers compound on long agentic coding sessions. Suite green.
147
+
148
+ ## 0.1.140 — 2026-09-28 — configurable compaction threshold (keep long sessions fast)
149
+ - Compaction can now fire EARLIER, configurably, so a long autonomous session doesn't crawl. Aurora does
150
+ ~56 tok/s fresh but drops to ~3 tok/s once the context reaches ~200k tokens (generation grinds through a
151
+ huge KV cache). Compaction previously fired only near 0.85×window, so users spent a long time in the slow
152
+ zone first. Now `settings.compaction.threshold` (and env `KODE_COMPACTION_THRESHOLD`) let you lower it —
153
+ e.g. 0.6 keeps the live context smaller and generation snappy, at the cost of summarizing sooner.
154
+ - Wired settings→Session→runTurn (mirrors maxRounds): a `compactionThreshold` helper in settings.ts clamps
155
+ to [0.3, 0.95] (out-of-range/unset → undefined → runTurn keeps its 0.85 default, so no behavior change
156
+ unless set), resolved identically for the CLI, headless, and ACP surfaces. 3 new tests (clamp, env parse,
157
+ lower-threshold-fires-sooner). Full suite 662 green. Default unchanged.
158
+
159
+ ## 0.1.139 — 2026-09-28 — web_fetch: real-browser fallback on bot-blocks (403/429)
160
+ - When `web_fetch` hits a 403/429 (Cloudflare-fronted sites like x.ai favor these over a real error page),
161
+ it now retries through the AXE autopilot's real-browser `/markdown` route — the same `KODE_AUTOPILOT_URL`
162
+ backend `web_search` uses for `/serp` — and returns the rendered page. If no autopilot backend is
163
+ configured (or it also fails), it returns clear guidance ("<url> blocks automated fetch — needs a real
164
+ browser; try web_search or the browser tools") instead of a scary `error: HTTP 403`. Other non-ok statuses
165
+ (500 etc.) are unchanged, and the success + timeout paths are untouched.
166
+ - Removes the red-error/curl-fallback dance for bot-protected sites the model was researching. 5 new tests
167
+ (403/429 → guidance with no backend; 403 → backend render; 200 + 500 unchanged). Full suite 659 green.
168
+
169
+ ## 0.1.138 — 2026-09-28 — ACP: Operator drops into Zed / any ACP editor
170
+ - New `operator acp` subcommand runs Operator as an Agent Client Protocol agent over stdio (JSON-RPC), so
171
+ Zed — and VS Code via an ACP bridge — can spawn it as a first-class coding agent, the way Cursor/Cline/
172
+ Continue plug into editors. Uses the official `@zed-industries/agent-client-protocol` lib for framing.
173
+ - Pure translation layer (`src/acp/`): a `session/prompt` becomes `Session.send()`; the session's streaming
174
+ callbacks become `session/update` notifications — onDelta→agent_message_chunk, onReasoning→
175
+ agent_thought_chunk, onToolStart→tool_call, onToolResult→tool_call_update; the turn's outcome→stopReason.
176
+ No re-implemented loop: ACP funnels into the single `runTurn` (via Session), inheriting compaction,
177
+ loop-guard, and the verify gate. `cancel` maps to Session.interrupt(). stdout is the protocol channel, so
178
+ console.* is routed to stderr in ACP mode.
179
+ - Verified: live initialize→session/new→session/prompt handshake against Aurora (streams agent_message_chunk,
180
+ returns stopReason=end_turn) + 4 unit tests pinning the update field shapes. Full suite 654 green.
181
+ - Zed config: add to `~/.config/zed/settings.json` under `agent_servers`: `{"Operator": {"command":
182
+ "operator", "args": ["acp"]}}`. Then pick Operator in Zed's agent panel.
183
+
184
+ ## 0.1.137 — 2026-09-28 — checkpoint works in any dir + web_fetch stops 403-ing
185
+ - `checkpoint` no longer fails with "fatal: not a git repository" in a non-git workspace. It now `git init`s
186
+ the workspace when there's no enclosing repo (so "save my work" succeeds anywhere), and treats a clean
187
+ tree as a friendly "nothing to commit" instead of an error. The init only fires when rev-parse finds NO
188
+ repo, so it can never reach up into a parent repo (the ~/.axe monorepo trap).
189
+ - `web_fetch` sends a real browser User-Agent instead of `operator/kode-tsi`, so Cloudflare-fronted sites
190
+ (e.g. x.ai) return the page instead of 403 — removing the red errors + the curl fallback dance. (404s from
191
+ the model guessing non-existent URLs are unchanged — that's exploration, not a tool fault.)
192
+
193
+ ## 0.1.136 — 2026-09-28 — truthful wordmark: drop the last AURORA/1M leftovers
194
+ - The boot masthead sub-tagline rendered `✷ AURORA · …` under the OPERATOR block wordmark (both the stdout
195
+ banner and the AuthScreen `<Masthead/>`). Now `✷ OPERATOR · …`, matching the footer StatusRule — the visible
196
+ UI no longer says AURORA anywhere (the model still resolves under its `aurora-300k` display route; only the
197
+ brand wordmark changed). Stale "AURORA wordmark" comments in StatusRule.tsx corrected to OPERATOR.
198
+ - Pairs with the already-shipped `300K · v` boot tagline (cli.tsx) so the startup banner is fully truthful:
199
+ OPERATOR · 300K, never AURORA · 1M. No logic change; UI strings only. Full suite green.
200
+
201
+ ## 0.1.135 — 2026-09-27 — compaction circuit breaker (never spin over-budget)
202
+ - If a request is over the model's window and compaction runs but **can't free enough space** — the summarizer
203
+ keeps failing, or the over-budget bulk is non-tool prose that `fitToWindow` can't elide — the turn no longer
204
+ spins round after round hitting the same wall up to the 400-round ceiling. After 3 rounds still over budget,
205
+ it stops cleanly with an honest message and hands control back ("start a fresh session or ask again with a
206
+ shorter request — nothing was lost"). Resets the instant a round fits, so a transient squeeze never trips it.
207
+ - Roadmap item #6. `compaction.ts` already had the `fitToWindow` stub-eviction tier; this adds the one
208
+ genuinely-missing piece the amplification review flagged. Full suite 650 green.
209
+
210
+ ## 0.1.134 — 2026-09-27 — MUTATING_TOOLS single source of truth + amplification roadmap
211
+ - The `MUTATING_TOOLS` set (which tools count as a workspace edit — used by the loop-guard reset, the
212
+ verify-before-done gate, and the stuck-turn no-edit streak) was duplicated identically in three files
213
+ (agent.ts, executor.ts, verify-gate.ts). Consolidated into one dependency-free leaf module `tools/mutating.ts`
214
+ imported everywhere — removes 3-way drift risk and is the foundation the coming checkpoints work keys its
215
+ snapshots off. tsc clean, full suite 649 green (pure refactor, zero behavior change).
216
+ - Recorded the full **Operator amplification roadmap** in `_ai-docs/roadmap/` — a sequenced plan from a
217
+ 7-agent research workflow + adversarial critique (ground-truthed against the real files): grammar-constrained
218
+ tool-call decoding, piggybank/boomerang → result-cap, ngram speculative decoding, shadow-git checkpoints,
219
+ the verify-gate/checkpoint-restore correctness flywheel, and the own-model big bets (distilled draft +
220
+ fast-apply models, trajectory RL). The strategy: we own Aurora's weights and serving stack, so the
221
+ highest-leverage wins are ones a hosted-API agent structurally cannot do.
222
+
223
+ ## 0.1.133 — 2026-09-27 — compaction rehydration (continuity after a compaction)
224
+ - **After a compaction, the model no longer acts on stale file state.** A compaction summarizes away raw tool
225
+ outputs, so a file read many turns ago survives only as a lossy summary — and a later edit could work from
226
+ that outdated content. runTurn now tracks the files the model actually read/edited (LRU, most-recent first,
227
+ capped at 5) and, whenever a compaction actually evicts turns, injects a rehydration note: it points the
228
+ model back to the summary's PENDING / NEXT STEP and names those files to re-read fresh before relying on them
229
+ ("do NOT trust a summarized earlier read"). Injected at both the proactive and the context-exceeded
230
+ compaction paths.
231
+ - Path tracking is tool-name-agnostic (any tool call carrying a `path`/`paths` arg), never throws on
232
+ unparseable args, and dedups + LRU-promotes a re-touched file. New test file covers the tracker, the note
233
+ format, and a real compaction in runTurn injecting the note. Full suite 649 green. (Compaction overhaul: gap
234
+ 3 of 5 done; owed: microcompaction cadence, evals.)
235
+
236
+ ## 0.1.132 — 2026-09-27 — 300K context window (truthful) + compaction/failover hardening
237
+ - **Context window is now truthfully 300K, and that fixes the failover.** Aurora serving was standardized to
238
+ 300K (`--ctx-size 307200`, q8_0 KV cache) on JL1+JL2, but Operator still claimed 1,048,576 (1M). That
239
+ mismatch WAS the failover cause: Operator compacts at 0.85×window, so at 1M it never compacts until ~890k,
240
+ but the server's real ceiling is hit first → reactive failover. `ctxWindow`/`ctxLimit`/`ctx` are now 307200
241
+ in settings, router, and the model registry — compaction fires at ~261k, before the ceiling.
242
+ - **Truthful display.** Masthead 1M→300K; the tier label derives from the window via /1024 (307200→"300K",
243
+ 131072→"128K"); the status model name reads `aurora-300k` (internal id and `/model aurora-1m` alias
244
+ unchanged); and the footer brand wordmark is now `✷ OPERATOR` (the product) instead of `✷ AURORA` — so the
245
+ model field (`aurora-300k`) no longer duplicates the brand. The persona no longer tells the model it has 1M.
246
+ - **Compaction/failover hardening** (three HIGH findings from an adversarial review):
247
+ 1. the summarizer now hits the endpoint the live turn actually used (captured via onRoute) instead of the
248
+ default — cache-safety survives a failover or MOA aggregator turn;
249
+ 2. `compact()` wraps the summarizer so a transient error / timeout / dead failover endpoint during
250
+ compaction SKIPS the compaction (history preserved, caller retries) instead of killing the turn;
251
+ 3. `summarize()` returns "" on a genuinely empty response so the empty-summary guard fires and can't
252
+ silently replace real history with a placeholder.
253
+ - Plus two summary-contract fixes: the compaction instruction no longer leaks into the summary's USER MESSAGES
254
+ section, and a repeated compaction carries forward a prior summary's values instead of dropping them.
255
+ - Full suite 645 green; 300K generation verified live on JL1 and JL2.
256
+
257
+ ## 0.1.131 — 2026-09-27 — stuck-turn guard: catch the semantic loop the signature guards miss
258
+ - **A turn can no longer spin for 28 minutes going in circles.** Live: Operator ran 152 rounds / 28 min / 42k
259
+ tokens re-running near-duplicate diagnostic `bash` probes (varied only by comments / heredoc-vs-`-c`), with
260
+ the model itself repeatedly writing "I'm stuck in a loop" — and every existing guard missed it, because all
261
+ three ask "is this round a repeat of the last" while the calls varied just enough to slip each one. The turn
262
+ ended only by hitting the output-token limit.
263
+ - **New self-loop guard.** The one signal the signature guards miss is the model's OWN admission it is looping.
264
+ When the model says it's stuck/going in circles/"try a fresh approach" while still wanting to act and NOT
265
+ editing a file, it's nudged to fix-or-stop; on the 3rd such round it ends the turn gracefully and hands
266
+ control back (never a freeze). A file edit, a pivot, or a final answer clears it — so admitting-and-fixing is
267
+ never cut off, and a final answer that merely mentions "a different approach" is untouched.
268
+ - **New soft no-edit nudge.** After 15 tool rounds that change no file, ONE gentle "converge or say you're
269
+ blocked" nudge — never a stop, so a legitimate long read-only task (research, a big search) is never cut off.
270
+ - Tests: a varied self-declared loop stops by the 3rd admission; admit-once-then-pivot finishes; admit-while-
271
+ editing is never cut off; a 16-round no-edit survey gets one nudge and finishes. Full suite 644 green.
272
+
273
+ ## 0.1.130 — 2026-09-27 — 9-section summary contract (compaction overhaul, gap 2 of 5)
274
+ - **Compaction summaries are now lossless-on-resume.** The summarizer's contract replaces the old FACTS/STATE
275
+ pair with nine sections: INTENT, CONCEPTS, FILES & SNIPPETS, ERRORS & FIXES, APPROACHES, USER MESSAGES
276
+ (verbatim), PENDING, CURRENT, NEXT STEP — plus an explicit "omit ephemeral scratchpad." FACTS/STATE dropped
277
+ the two things a resuming turn needs most: the user's own asks (now quoted verbatim) and the WHY behind
278
+ rejected approaches. The global verbatim-value rule (identifiers, versions, paths, commands, error text) is
279
+ unchanged. Summary token budget 1200 → 1800 to fit the richer contract plus Aurora's reasoning channel.
280
+ - Builds on 0.1.129's cache-safe summarizer (the span is still sent as real messages reusing the live turn's
281
+ cached prefix). Full suite 640 green. (Gaps 3–5 owed: rehydration, microcompaction cadence, evals.)
282
+
283
+ ## 0.1.129 — 2026-09-27 — cache-safe compaction summarizer (compaction overhaul, gap 1 of 5)
284
+ - **Compaction no longer pays a cold prefill.** The summarizer used to re-serialize the evicted span into one
285
+ system-less, tool-less `user` message — a request that shares no prefix with the live turn's cached
286
+ `[system + tools + history]`, so the local llama.cpp server re-prefilled it from scratch on every compaction.
287
+ It now reuses the IDENTICAL system prompt + tools and sends the evicted span as REAL messages, appending the
288
+ fact-preserving contract as the final user message. Because the evicted span is the OLDEST slice, that head
289
+ is an exact prefix of the cached request — the server prefix-matches the warm KV and prefills only the
290
+ instruction. An O(context) summarize becomes O(instruction), and the full span is preserved (no more
291
+ 6000-char truncation dropping facts).
292
+ - The exact live system prompt is captured per-turn (`lastSys`) so a `/think` suffix or MOA-aggregator prompt
293
+ can't drift the prefix; a trailing unanswered `assistant(tool_calls)` is stripped so the appended user
294
+ instruction stays a valid sequence; the Aurora reasoning-channel fallback and handoff durability are
295
+ unchanged. New test drives a real `Session.compactNow()` and asserts the request is `[identical system,
296
+ span verbatim, contract]` + tools. Full suite 640 green. (Gaps 2–5 owed: 9-section contract, rehydration,
297
+ microcompaction cadence, evals — see _ai-docs.)
298
+
299
+ ## 0.1.128 — 2026-09-27 — a long, progressing task is never cut off unfinished (higher round ceiling)
300
+ - **Absolute round ceiling raised 200 → 400.** A big self-improvement or build task that keeps making real
301
+ progress now has 4.4× the headroom of the ~90-round runs seen live, so it finishes in one turn instead of
302
+ hard-stopping at `[stopped after N tool rounds]`. The ceiling only ever catches a genuine runaway; a
303
+ progressing turn is governed by the stall guard below, not a fixed count.
304
+ - **Stall guard loosened 6 → 8** consecutive no-progress batches. A long task can go momentarily quiet (a
305
+ planning round, a couple of empty greps) without being mistaken for stalled; 8-empty-in-a-row is still an
306
+ unambiguous stall and stops well below the ceiling. Both changes are strictly more permissive — no task
307
+ that finished before can be cut off now.
308
+ - Regression test: a 250-round *progressing* turn (distinct work each round, past the old 200 ceiling) reaches
309
+ its final answer at round 251. Full suite 637 green.
310
+
311
+ ## 0.1.127 — 2026-09-27 — malformed tool-call JSON can never freeze the user (enterprise-grade)
312
+ - **The freeze is fixed at the engine level (deterministic).** A `bash` call wrapping a multi-line `python3 -c`
313
+ script broke the tool-call JSON (`500: missing closing quote`), and every later turn re-erred because the
314
+ model kept reproducing the same inline script — user frozen. Now when the truncated-tool-call recovery
315
+ exhausts its nudges, the turn ENDS with a clean, actionable message instead of a raw 500 throw, so the user
316
+ always regains control (model-independent). Plus prevention: persona forbids inline multi-line scripts
317
+ (write to a file, run the file), the recovery nudge says the same, and narration must not delay the tool
318
+ call. True long-term root fix (owed): grammar-constrained tool-call decoding on the Aurora server. Recorded
319
+ in `_ai-docs/features/2026-09-27-malformed-toolcall-freeze.md`. 636 passing.
320
+
321
+ ## 0.1.126 — 2026-09-27 — round-loop guard nudges instead of ending the turn
322
+ - **The no-progress guard stopped WHOLE TURNS, breaking autonomy.** When a round (prose + the same tool call)
323
+ repeated 3× with no new result, the engine ended the turn with "I repeated the same step 3x… tell me how to
324
+ proceed" — even when (live 09-27) the model had just said "let me break out and fix X" and was cut off
325
+ mid-pivot. Fix: at 3 it now **nudges** the model to try a genuinely different approach and CONTINUES the
326
+ turn (skipping the repeated call); only if it ignores the nudge to a hard cap (6) does the turn stop. Keeps
327
+ Operator autonomous instead of handing back at the first stall. (`engine/agent.ts`.)
328
+ `test/agent-progress-cap.test.mts` (pivot-after-nudge finishes). 636 passing (+1).
329
+
330
+ ## 0.1.125 — 2026-09-27 — Operator narrates as it works (running commentary)
331
+ - **Depth for the user: narrate between tool batches.** Operator ran many tool calls per turn then surfaced
332
+ everything only at the turn boundary, so the user watched the mechanics but waited for the narrative. New
333
+ persona section instructs the model to write ONE terse line before a tool batch (what + why) and one after
334
+ a notable result (what it found + next) — a running commentary, high-signal, one line, not an essay. The
335
+ engine already streams + settles per-round content, so this surfaces live. (`config/persona.ts`.)
336
+ - Also: Operator now knows curl / the http_request no-shell HTTP fallback (carried from 0.1.124 note).
337
+
338
+ ## 0.1.124 — 2026-09-27 — agent_status is never loop-guarded + no longer forgets agents that ran
339
+ - **Poll/status tools are exempt from the loop guard.** `agent_status` (polling sub-agents) and `bash_output`
340
+ (polling a background job) are DESIGNED to be called repeatedly while waiting on async work — that's not a
341
+ spin. Live 09-27: `agent_status` polled while two sub-agents ran tripped the guard at 5 and kept firing
342
+ even though the model was doing real work (fetches, sleeps) between polls. They're now never guarded
343
+ (`engine/agent.ts`, `tools/executor.ts`). `test/loop-guard-mutation-reset.test.mts`.
344
+ - **`agent_status` no longer reports "no sub-agents spawned" when they clearly ran.** A finished/errored
345
+ agent decommissions from the live map after 45s idle, after which `agent_status` wrongly said none were
346
+ ever spawned (live 09-27: two errored agents vanished). `BackgroundAgents` now keeps a lightweight
347
+ **retired** record; `agent_status` reports "N ran earlier this session and decommissioned (their results
348
+ were posted to the conversation)" instead of the misleading "none." (`background/index.ts`, `cli.tsx`.)
349
+ - **Operator knows curl + the no-shell HTTP fallback.** New persona section: prefer the `http_request` tool
350
+ (or `web_fetch`/`web_search`) for HTTP since they run natively and keep working when bash is failing or
351
+ sandboxed; use `curl` via bash for special cases (`-H`/`-X`/`-L`/uploads); never conclude "can't reach a
352
+ URL" without trying `http_request`. (`config/persona.ts`.)
353
+ - Full suite: 635 passing (+1). tsc clean.
354
+
355
+ ## 0.1.123 — 2026-09-27 — de-duplicate the "operator" wordmarks (AURORA sub-brand, for now)
356
+ - **The name "operator" showed up 3×** on the boot screen (big block wordmark + the `✷ OPERATOR` tagline
357
+ beneath it + the `Operator` brand token + `operator-1m` on the status rule). Cleaned up (per James):
358
+ - The **big block `OPERATOR` title stays** (the main wordmark, untouched).
359
+ - The **`✷ OPERATOR` sub-wordmark → `✷ AURORA`** in the masthead tagline and the status rule.
360
+ - The masthead tagline **drops the redundant brand token** → `✷ AURORA · 1M · v…` (avoids an
361
+ "AURORA · Aurora" that would read like a bug); the CLI no longer reads `brand_name` in the masthead
362
+ (`brand.ts` remains as the shared accessor for the other surfaces).
363
+ - The status route shows **`aurora-1m`** via a **display-only** transform (`operator-` → `aurora-`) — the
364
+ internal model id, `/model`, routing, and persisted settings are untouched (no rename blast radius).
365
+ - The heavy `⬤` identity circle beside the email → a cleaner `◆`.
366
+ - Provisional ("for now"). `test/app-fullscreen.test.mts` updated. 634 passing, tsc clean.
367
+
368
+ ## 0.1.122 — 2026-09-27 — parallel web_search no longer races its own SearXNG startup
369
+ - **web_search worked alone but failed in parallel.** `web_search` is read-only, so `executeParallel` runs
370
+ several concurrently, and each calls `ensureSearxng()`. With no concurrency guard, all of them raced to
371
+ `docker run` the SAME `operator-searxng` container — the first won, the rest failed ("name already in use")
372
+ → returned null → those searches fell through to "no backend" and reported "found no results" (seen live
373
+ 2026-09-27 with 3 parallel searches). Fix: a **single-flight** guard — concurrent callers share ONE
374
+ in-flight startup and its result; the slot clears when it settles so a later cold start can still run. No
375
+ change to the serial path. `test/searxng-singleflight.test.mts`. 634 passing (+1).
376
+
377
+ ## 0.1.121 — 2026-09-27 — single-source brand (name) + loop guard lets you iterate
378
+ - **Loop guard no longer blocks edit → re-run iteration.** The identical-call guard tripped after 3 calls
379
+ with the same args, so re-running the SAME `pytest`/`compose`/build after editing a file was blocked as a
380
+ "loop" (James 09-27) — even though the workspace had changed. Fix: raise the limit 3→5 AND **clear the
381
+ identical-call counts whenever a file-mutating tool (`file_write`/`file_edit`) runs**, so verify-after-fix
382
+ re-runs are unbounded. A true spin (same call, NO intervening edit) still trips at 5; the narration /
383
+ no-progress stalls are unchanged. Applied to both guards (`engine/agent.ts`, `tools/executor.ts`).
384
+ `test/loop-guard-mutation-reset.test.mts`.
385
+ - **Single-source brand (CLI, Option B).** New `src/config/brand.ts` — the one client-side accessor for the
386
+ AuthGate `operator` tenant brand (`brandSync`/`refreshBrand`/`adoptBrand`): offline-first (synchronous
387
+ cache/default at boot, background refresh, 1h TTL, never blocks, never throws). The CLI masthead name now
388
+ reads `brand_name` from it. Per the platform decision (Option B), the CLI adopts NAME/identity text only —
389
+ the tenant `brand_color` is ignored; the terminal keeps its violet `#b98cff` accent. `test/brand.test.mts`.
390
+ - Full suite: 633 passing (+4). tsc + biome clean.
391
+
392
+ ## 0.1.120 — 2026-09-27 — session_handoff truncation recovery (multi-line nudge)
393
+ - **Truncated `session_handoff` (and any multi-line note) now gets the RIGHT recovery nudge.** Live 09-26:
394
+ a `session_handoff` note truncated at column 164 (a premature model stop mid-string) surfaced as a hard
395
+ `aurora /v1 500: missing closing quote` turn error even though the real work was already committed +
396
+ pushed. Cause: the truncation-recovery nudge picks by column only (`<300 → "fix your quoting"`), so an
397
+ early cut-off of a long note was misread as a stray-quote bug — the model kept re-quoting a call with no
398
+ quote problem and burned all 3 retries. Fix: detect a **multi-line content body** by the escaped newlines
399
+ the server echoes in `last read: '…'` (2+ `\n` = a note/file, never a shell command) and route it to the
400
+ shorten/split nudge regardless of column; that nudge now also covers un-splittable notes ("rewrite MUCH
401
+ shorter") not just file writes. `test/truncated-toolcall.test.mts` (multi-line low-column case). 628
402
+ passing (+1). Note: the work itself was never at risk — only the trailing scratch note.
403
+
404
+ ## 0.1.119 — 2026-09-27 — auth client_id canonicalization · Biome lint · monorepo hygiene
405
+ - **Device-flow `client_id` → canonical `operator`.** `src/auth/client.ts` now sends `"operator"` (the
406
+ AuthGate Postgres app_id) instead of `"operator-cli"`, so the gate/brand surfaces key on the same tenant.
407
+ Confirmed harmless with the operator-tsi lane (device service records it as a free-text label, no
408
+ registration/lookup).
409
+ - **Biome lint config (dev-only).** `@biomejs/biome` devDependency + `biome.json`; `npm run lint` runs
410
+ `biome check src test` → 80 advisory warnings, 0 errors, exit 0. Linter on `recommended` with the rules
411
+ that fire on the existing style set `off` and the rest `warn`; formatter configured but `enabled: false`
412
+ (enforcing it would reformat the whole tree). No source files touched. Biome config gotchas recorded in
413
+ `_ai-docs/conventions/kode-tsi.md`.
414
+ - **Monorepo hygiene.** Root README H1 `# kode` → `# Operator` (body was already Operator-branded); root
415
+ `.gitignore` now ignores `node_modules` with **no trailing slash** (worktrees symlink it to the main
416
+ checkout, and a symlink isn't a dir — the old `node_modules/` skipped it). New living log
417
+ `_ai-docs/operator-frontier-gaps.md` (open: list_directory ENOENT hinting, git-tool cwd).
418
+
419
+ ## 0.1.118 — 2026-09-26 — sub-agents get a designated box
420
+ - **Sub-agents panel is now a designated, bounded region.** During a busy turn the background sub-agents
421
+ list rendered flush under the (up to 10-item) plan list with a vague `background` header — cramped and
422
+ hard to parse. It's now a dim **rounded box** headed `sub-agents · N running`, detached from the plan by a
423
+ top-margin gap, so it reads as its own zone (matching the "⇉ tools in parallel" card). Kept SHORT
424
+ (`BG_MAX_VISIBLE` cap + capped activity lines) to stay clear of the v0.1.92 dynamic-frame border-orphan
425
+ flood; documented one-line fallback to borderless if it ever recurs on a very long turn.
426
+ `test/bgpanel.test.mts` (box border + label assertion). 627 passing (+1). tsc clean.
427
+
428
+ ## 0.1.117 — 2026-09-26 — minimize-duplication guard · compaction progress TUI
429
+ - **Minimized-terminal text duplication, fixed.** Minimizing the window fires a resize reporting
430
+ `columns/rows = 0`, and `process.stdout.columns ?? 80` does NOT catch `0` (`??` only falls back on
431
+ null/undefined). A `0` divided in `liveTail`'s wrap math (→ Infinity/NaN) and returned the WHOLE
432
+ streaming message unbounded — Ink then stacked the streaming line ~30× into scrollback. New
433
+ `ui/term.ts` (`termCols`/`termRows`, floored to a sane minimum) is now the ONE place layout reads the
434
+ window size; all 9 dimension reads route through it, and `liveTail` clamps internally as defense in
435
+ depth. `test/transcript.test.mts` (0×0 regression case).
436
+ - **Compaction progress TUI + double-run guard.** `/compact` runs the multi-second Aurora summarizer;
437
+ before this it showed nothing while running, so users pressed it again and it ran twice (double-freed).
438
+ New `compacting` `AppStatus` drives the amber `RecoverSpinner` ("compacting context…") so it's visibly
439
+ in progress; a synchronous `statusRef` guard makes a second `/compact` while one is in flight a no-op
440
+ ("compaction already in progress…"); the done line now reports `freed ~N · ctx X%→Y%` so completion is
441
+ unmistakable. `test/app-fullscreen.test.mts` (compacting spinner renders).
442
+ - Full suite: 626 passing (+2). tsc clean.
443
+
444
+ ## 0.1.116 — 2026-09-26 — colored edit diffs · plan-mode Approve&run · web parallel box · repo hygiene
445
+ - **Colored edit diffs on file-edit rows.** A settled `file_edit`/`multi_edit`/`file_write` row now shows
446
+ green `+N` / red `−M` (and up to 4 colored preview lines on small edits) so "what changed" reads at a
447
+ glance. Pure `ui/editdiff.ts` (LCS line diff, capped) + `ToolStep` render; degrades to the old row for
448
+ non-edits. `test/editdiff.test.mts` + `test/toolstep-editdiff.test.mts`.
449
+ - **Plan mode "Approve & run".** When a plan was proposed in plan mode, exiting plan mode surfaces a picker
450
+ `[Approve & run / Keep planning / Cancel]`; **Approve auto-submits "Proceed with the approved plan."** so
451
+ it executes without re-typing. Pure `ui/planExit.ts` (`shouldPromptPlanExit`/`resolvePlanExit`) +
452
+ QuestionPrompt. `test/plan-exit.test.mts`.
453
+ - **Parallel-batch box now crosses to web.** The frozen `ToolEvent` gains additive `batchId`/`batchSize`/
454
+ `batchIndex` (stamped per round in `engine/agent.ts`, threaded through `permissions`/`session`), and
455
+ **kode-web** groups concurrent tools into the same "⇉ N tools in parallel" bordered card (`groupByBatch`,
456
+ live `onToolResult` rows). Mobile grouping is a documented follow-up (`_ai-docs/features/…-web.md`).
457
+ - **Repo hygiene (kiyoko).** Proprietary `LICENSE` at monorepo root, `.gitignore` hardening (`.env*`,
458
+ `.DS_Store`, `coverage/`, `*.tsbuildinfo`), and a `typecheck` npm script.
459
+ - Serving: Aurora KV `q8_0 → f16` on JL2 (idle decode 56 → 60 tok/s) + 128K context; the earlier slowness
460
+ was node contention, not the model. Suite target 600+/0.
461
+
462
+ ## 0.1.115 — 2026-09-26 — parallel tool calling: read_files batch tool, parallel box, paste fix
463
+ - **`read_files` batch tool + `parallel_tool_calls` (emission — the speed lever).** New `read_files`
464
+ (`tools/registry.ts`) reads up to 20 files in ONE call via `Promise.allSettled` — string paths or
465
+ `{path,offset,limit}`, per-file error isolation, reusing `fileRead`'s sandbox/cap guards. One call
466
+ replaces N serial `file_read` round-trips (the biggest wall-clock win on a slow decoder). `aurora.ts`
467
+ sets `parallel_tool_calls: true` on the /v1 request so a compliant server can emit multiple tool calls
468
+ per turn; the persona directive now pushes batching. `test/tools-extra.test.mts`.
469
+ - **Parallel tool-batch box (rendering lane).** When >1 tool runs CONCURRENTLY in a round (`executeParallel`),
470
+ the terminal groups them into ONE round-bordered box — "⇉ N tools in parallel · <dur>" header over the
471
+ per-call rows — instead of a flat list. New `ui/ToolBatch.tsx` (reuses the SummaryCard border + ToolStep
472
+ row); `cli.tsx` `onToolBatch` pushes a single `{kind:"toolBatch"}` entry when a round has >1 tool.
473
+ `test/toolbatch.test.mts`. (web/mobile grouping needs a `batchId` on the frozen event contract — a
474
+ follow-up.)
475
+ - **Composer paste fix.** Bracketed paste no longer leaks `\x1b[200~`, duplicates, or hangs on an
476
+ unterminated paste (50ms idle-flush fallback clears the guard); a pasted `/path` is no longer parsed as a
477
+ slash command (`util/slash.ts` requires a single line + a known command token). `PasteStateMachine` + 10
478
+ behavior tests.
479
+ - **/login:** a second consecutive bare `/login` opens the browser device-grant (no `--browser` needed);
480
+ clearer opener message (`open()` can silently no-op over SSH / non-default browser). Suite 597/0.
481
+
482
+ ## 0.1.114 — 2026-09-26 — in-session /login uses the working email-code flow
483
+ - Live bug: in-session `/login` went straight to the RFC 8628 browser device-grant, which dead-ends at
484
+ "token copied" and never completes back in the session — so people who ran `/login` got stuck with a
485
+ copied token and no sign-in. (`auth/commands.ts` already defaults the SHELL `operator auth login` to email
486
+ for exactly this reason — it documents the terminal→browser dance as janky.) Rewired `/login` to the same
487
+ proven email + 6-digit-code flow: **`/login <email>`** sends a code, **`/login <code>`** verifies it and
488
+ signs in. `/login <token>` still pastes a PAT; **`/login --browser`** is the explicit device-grant fallback.
489
+ - Extracted the pure arg router **`classifyLoginArg`** (`src/auth/login-intent.ts`) so routing is tested
490
+ apart from the network glue — pins that a PAT isn't mistaken for an email, nor a token for a 6-digit code.
491
+ `test/login-intent.test.mts` (+2 tests). Suite 566/0.
492
+
493
+ ## 0.1.113 — 2026-09-26 — memories.md: flat global + project memory (Claude-parity)
494
+ - Operator now auto-loads a flat, always-loaded **`memories.md`** into its system prompt every session — the
495
+ same model comparable agents use, with a **global** layer (every project) plus a **project** layer (this
496
+ repo). Global lives beside `operator/settings.json` (`~/.axe/operator/memories.md`; override with
497
+ `KODE_MEMORIES_FILE`); project is `.operator/memories.md` (or a repo-root `memories.md`). Global is emitted
498
+ FIRST and project LAST, so a repo-specific note overrides a global one — the same more-specific-wins
499
+ precedence as the settings layer. Distinct from the existing semantic recall store (relevance-ranked): this
500
+ is plain, human-editable markdown injected verbatim, wired into BOTH the interactive shell (`cli.tsx`) and
501
+ the headless autonomy runners (`session-factory.ts`), so `operator run/loop` gets the same memory.
502
+ - **`/remember [--global] <note>`** now appends a bullet to `memories.md` (project by default; `--global`
503
+ targets the user-global file), creating the file with a heading on first write — the write half kept in
504
+ sync with the read half — while still feeding the semantic store. `persona.ts` gains `loadMemories`,
505
+ `appendMemory`, `globalMemoriesPath`, `projectMemoriesPath`. `test/persona.test.mts` (+3 behavior tests:
506
+ both layers load and order, append-creates-then-reads-back, absent-is-silent). Suite 564/0.
507
+ - Completes the sub-agent lifecycle (spawn → status → message → **stop** → **monitor**) on top of 0.1.111's
508
+ id-fix. **`stop_agent`**: `stop_agent(id)` halts one running sub-agent, `stop_agent()`/`"all"` cancels every
509
+ running + drops every queued one, each posting a `[stopped by user]` note (no silent vanish, no double-post).
510
+ **Observability:** BgPanel states are now unambiguous (running / done / errored / queued; done shows "result
511
+ posted", errored "check transcript"); a **`/agents`** command lists sub-agents with round/label/tokens/elapsed
512
+ + a summary count line; and a **turn-end banner** ("N sub-agents still running — results post when done") fires
513
+ when the foreground finishes while agents are live, so "turn complete" is never misleading.
514
+ `test/agent-stop.test.mts` + `test/agent-observability.test.mts`. Suite 561/0.
515
+
516
+ ## 0.1.111 — 2026-09-26 — sub-agents stop being mistaken for shell jobs
517
+ - Live: the model spawned sub-agents (ids `bgN`), then tried to poll them with `bash_output(id=bg1)` →
518
+ "no background job bg1", concluded they were "evicted by compaction" (they were still running), and
519
+ re-spawned DUPLICATES onto the one shared endpoint. Fix (lands PR from the sub-agent lane): sub-agent ids
520
+ renamed `bgN` → `agent-N` (disjoint from `shell_background`'s own `shN` ids); `bash_output`/`bash_kill`
521
+ now REDIRECT an `agent-N`-shaped id to `agent_status`/`message_agent` instead of a bare error; a new
522
+ read-only **`agent_status`** tool gives the model a real status check instead of guessing "evicted"; and
523
+ `spawn_agent`/`message_agent` wording now states plainly that a sub-agent auto-posts its result and must
524
+ not be polled or re-spawned. `test/agent-id-namespace.test.mts`. Suite 546/0.
525
+
526
+ ## 0.1.110 — 2026-09-26 — wait out a "Loading model" 503 instead of failing the turn
527
+ - Live: a JL2 aurora restart returned `503 "Loading model"` and the turn died — a 503 was generic-transient
528
+ (≤3 retries, ~8s backoff = ~24s), giving up before the ~30-90s model reload finished. New `"loading"`
529
+ self-heal class: `classifyFailure` maps a 5xx whose body says loading/warming/starting (not a bare
530
+ "unavailable") to `loading`; the loop waits it out on a separate patient budget (`MAX_LOADING_RETRIES`=20 ×
531
+ `loadingBackoffMs`, default 6s ≈ 2min) and retries the SAME endpoint (no failover — it's the one coming
532
+ up). A generic 503 still fails over as transient. `test/loading-retry.test.mts`. Suite 542/0.
533
+
534
+ ## 0.1.109 — 2026-09-26 — sub-agent lifecycle hardening (lands #36)
535
+ - Lands the sub-agent lifecycle hardening pass (PR #36) on top of 0.1.108: a bounded in-flight queue
536
+ (running + queued, not just running) behind one shared capacity line; the plan pane refreshes live on a
537
+ child's task activity; a shallow-test detector that stops a hollow existence-only test from
538
+ rubber-stamping `verified:true`; `makeSession()` failure handling and a wall-clock stall watchdog; the
539
+ truncated-tool-call nudge now targets the actual cause (quote vs chunk, picked from the server's parse
540
+ position; retries 2→3); and a colored per-round activity phrase in the background panel. Also carries the
541
+ voice mic-first session-open fix already on `main`. Suite 540/0.
542
+
543
+ ## 0.1.108 — 2026-09-26 — /compact rescues a session stuck over a small window
544
+ - Companion to 0.1.107. Live: on a failed-over 64K endpoint at 70k tokens, `/compact` said "nothing to
545
+ compact yet" — `compactNow` force-evicts via `compact()`, which only drops turns older than
546
+ `minKeepTurns` (2), so when the bulk is a single huge recent turn (a trace dump) nothing is evictable and
547
+ the message-count delta is 0. Now `compactNow` also `fitToWindow` after evicting — eliding the largest
548
+ tool outputs in place until it fits the active endpoint's (learned) window — and reports approx TOKENS
549
+ freed ("freed ~N tokens" / "already minimal — nothing to shed") instead of a message count. Same
550
+ `fitToWindow` the auto-recovery path uses. `test/compact-command.test.mts`. Suite 525/0.
551
+
552
+ ## 0.1.107 — 2026-09-26 — never crash on context overflow; paste keeps its payload
553
+ - Context-overflow crash (live 09-26): a turn died on `aurora /v1 400 exceed_context_size_error`
554
+ (`n_ctx` 65536) after failover to a JL2 endpoint serving 64K while the roster advertised 256K — so
555
+ proactive compaction, sized to the advertised window, never fired and the request overflowed the real
556
+ limit. Fix, three layers: (1) LEARN the real window from the server's own error (`selfheal.servedContextLimit`
557
+ parses `n_ctx`; `AuroraRouter.observeContextLimit` clamps the endpoint DOWN, monotonic) so proactive
558
+ compaction fires correctly for the rest of the session; (2) when the bulk is a single huge recent turn
559
+ eviction can't shed, `compaction.fitToWindow` elides the largest tool outputs in place so the retry fits;
560
+ (3) the per-round choke point now fits-to-window after compacting, so a request is never dispatched over
561
+ the current window. The turn recovers (learn → elide → retry) instead of throwing. New integration test
562
+ drives the real `runTurn` against a 400-then-200 server. `_ai-docs/features/2026-09-26-context-overflow-recovery.md`.
563
+ - Composer paste: a bracketed paste collapsed to a `[Pasted #N]` chip but DISCARDED the payload —
564
+ Enter sent the literal label, not the pasted text (multi-line steers arrived as `[Pasted #1]`). Now the
565
+ payload is stored and expanded on submit (`pasteChip`/`expandPastes`, unit-tested without a TTY); short
566
+ single-line pastes stay inline.
567
+ - Suite 523/0. Ships ahead of PR #36 (sub-agent lifecycle hardening), which lands next as 0.1.108.
568
+
569
+ ## 0.1.106 — 2026-09-26 — background panel reads as progressing, not "broken"
570
+ - A throttled sub-agent queue (2 run at a time on the shared endpoint, the rest wait for a slot) looked
571
+ stuck: header said only "background (4)". Now it shows "background · N running · M queued", and rows are
572
+ sorted working-first (0.1.104) — so a draining queue reads correctly. Suite 507/0.
573
+
574
+ ## 0.1.105 — 2026-09-26 — robust by default: stop over-fanning-out sub-agents on one endpoint
575
+ - Live: Operator spawned 5-6 sub-agents for a linear 8-item plan; since they ALL share the one Aurora
576
+ endpoint, parallel = contention, so it crawled 25+ min at 0/8. Parallelism on a single model endpoint
577
+ does not speed a linear plan — it slows it.
578
+ - Fix (two layers): (1) `spawn_agent`'s description now tells the model plainly that it shares ONE endpoint
579
+ with its sub-agents, to use spawn_agent only for genuinely independent long work at most 1-2 at a time,
580
+ and to do a linear/dependent plan itself in sequence; (2) hard backstop `MAX_BG` 4→2 concurrent. With
581
+ 0.1.104's panel cap, the frame also stays clean. Suite 507/0.
582
+
583
+ ## 0.1.104 — 2026-09-26 — stop the duplicated-plan "mess": cap the background-agents panel
584
+ - Live on JL2: with a 6-agent fan-out, the plan pane + background panel re-rendered every ~2s and Ink's
585
+ INLINE redraw orphaned a STALE copy of the whole frame into scrollback on each re-render — the plan
586
+ stacked up 3-5× ("this is a mess"). Root cause: a tall, frequently-changing dynamic frame near the
587
+ terminal bottom loses Ink's cursor anchor, so it appends instead of erasing.
588
+ - Fix: `BgPanel` now shows at most 3 agents (working first) + a `+N more running` line, so the dynamic
589
+ frame stays short and the in-place redraw stays reliable. (Fullscreen/alt-screen avoids the orphaning
590
+ entirely and is the recommended mode for heavy fan-out — `ui.fullscreen: true`.) Suite 507/0.
591
+
592
+ ## 0.1.103 — 2026-09-26 — fix the malformed-tool-call recovery for the embedded-quote case
593
+ - Live 09-26 (v0.1.98 on JL2): a turn died on `aurora /v1 500: Failed to parse tool call arguments as JSON
594
+ … missing closing quote` when the model emitted `grep -l "^dependencies"` — a raw double-quote inside a
595
+ bash argument that broke the tool-call JSON. selfheal correctly classified it as `truncated_tool_call`,
596
+ but the recovery nudge only described the OTHER cause (an over-long file write cut off at the token
597
+ limit), so the model got useless guidance, re-emitted the same quoted command, exhausted the 2 retries,
598
+ and the turn errored.
599
+ - **Fix (both layers):** (1) the nudge now covers BOTH causes and gives the concrete fix — rewrite a
600
+ double-quoted pattern with single quotes (`grep -l '^x'`), or split an over-long write; (2) preventive:
601
+ the `bash` tool description now tells the model to prefer single quotes for patterns/paths. Full suite
602
+ 507/0; `tsc` clean.
603
+
604
+ ## 0.1.102 — 2026-09-26 — .operator/ harness loader: repo-local agents & commands
605
+ - The engine loaded a single `.operator/AGENTS.md`; this adds the DIRECTORY half — `.operator/agents/*.md`
606
+ (named sub-agent personas) and `.operator/commands/*.md` (command playbooks), the model-agnostic analog
607
+ of a `.claude/agents|commands` dir. A repo now SHIPS its own harness instead of it living in one
608
+ operator's home directory. New `src/config/operator-harness.ts` (`loadOperatorAgents/Commands`,
609
+ `renderHarnessContext`, `operatorAgentPersona`), wired into both the interactive (`cli.tsx`) and headless
610
+ (`session-factory.ts`) system prompts.
611
+ - **`spawn_agent` gains an optional `agent`** — naming a repo persona from `.operator/agents/` prepends it
612
+ to the sub-agent brief (low-risk task-prefix; no background-factory change). The model sees the available
613
+ agents + commands listed in its context.
614
+ - Seeded this repo: `.operator/agents/{code-reviewer,test-writer}.md`, `.operator/commands/{release,review-changes}.md`.
615
+ - Tests: `test/operator-harness.test.mts` (7). Full suite 507 passed, 0 failed; `tsc` clean.
616
+
617
+ ## 0.1.101 — 2026-09-26 — task list: add `task_clear`; nudge incremental status updates
618
+ - The plan had no way to be CLEARED — the model could only `task_add` and `task_update` status, so "clear
619
+ the list / reset / move on" had no honest home (it would mark everything done to hide the pane). Added a
620
+ **`task_clear`** tool (wipes the list; `completed_only:true` drops just finished tasks). PlanPane already
621
+ hides once every task is done — now the model can also clear on request.
622
+ - Strengthened `task_update`'s guidance: mark `in_progress` when a step starts and `done` the instant it
623
+ finishes, ONE at a time, not batched at the end — so the live plan tracks real progress instead of jumping
624
+ at the turn's end (the batched-update behavior seen with the small local model). Full suite green (500/0).
625
+
626
+ ## 0.1.100 — 2026-09-26 — REVERT 0.1.99: the catalogue serves `/v1/skills` (0.1.99 was a regression)
627
+ - 0.1.99 wrongly repointed `skill_list`/`skill_fetch` to `/skills`. Root cause of the mistake: I read
628
+ JL1's *incidental* lightweight `:8401` service (which serves `/skills`) as the skills origin. The
629
+ **canonical** catalogue that `operator.axe.onl` / `skills.axe.onl` reach (`axe-skills-catalogue`,
630
+ hub.serve, on JL2 `:8742`) serves the **versioned** contract — `/v1/skills`, `/v1/skills/search?q=`,
631
+ `/v1/skills/<slug>` — verified live 200 with real data. `/skills` 404s there. So 0.1.99 broke
632
+ `skill_list` against the real registry.
633
+ - Reverted to `/v1/skills*`. The original "unreachable" symptom was a **downed tunnel** (`axeskills-operator`
634
+ CF error 1033, ~24h), not a client path bug — it self-recovered. Full suite green (500/0); `tsc` clean.
635
+ - Lesson encoded in-code: a same-numbered port on a different host is a different service; when skills read
636
+ "unreachable", check the tunnel/origin, don't change the path.
637
+
638
+ ## 0.1.99 — 2026-09-26 — skill registry: speak the backend's real `/skills` contract
639
+ - `skill_list` / `skill_fetch` called `/v1/skills*`, but the AXE skills origin (operator.axe.onl /
640
+ skills.axe.onl → the `:8401` skillsapi) serves the listing at `/skills` (search via `?q=`), not a
641
+ versioned path — `/v1/skills` 404s. Repointed the client to the origin's actual contract: `/skills`,
642
+ `/skills?q=<q>`, `/skills/<slug>`. This is why `skill_list` reported "skill registry unreachable" even
643
+ when the origin was reachable. Verified live: `curl <origin>/skills` → 200 with the real skill list
644
+ (count 110) when routed to the JL1 skillsapi. Full suite green (500/0); `tsc` clean.
645
+ - Note: the public `operator.axe.onl` / `skills.axe.onl` hostnames also had a *connectivity* fault
646
+ (CNAME'd to a downed tunnel; fleet routing since split-brained between the JL1 skillsapi and an
647
+ unrelated gateway) — that half is a fleet-infra action, tracked separately; this release fixes the
648
+ client path so the tool works end-to-end the moment the origin routing is sound.
649
+
650
+ ## 0.1.98 — 2026-09-26 — cut residual inline flashing (slow the animation timers)
651
+ - Ink re-renders the WHOLE frame on every state change, so each animation timer is a full-frame redraw.
652
+ Three independent fast timers compounded on top of the 64ms stream throttle and flashed on Terminal.app.
653
+ Slowed them ~40% with no loss of legibility: **StepSpinner 80→125ms**, **ThinkingSpinner 110→150ms**,
654
+ **ToolStep elapsed 100→250ms**, **turn elapsed 250→500ms**. Combined with the 0.1.94 stream/swarm throttle
655
+ and the 0.1.97 inline default, this is the low-render-pressure path. Full suite green; `tsc` clean.
656
+
657
+ ## 0.1.97 — 2026-09-26 — revert fullscreen-default (regressed) + AI-agnostic fleet model config
658
+ - **Reverts fullscreen as the default (0.1.96 was wrong).** Fullscreen (alt-screen) redraws the WHOLE frame
659
+ on every spinner tick / timer / token, which flashes far more than inline's small dynamic-tail redraw —
660
+ and its boot render doubled the masthead/service-preflight lines with a dead middle. Inline is the default
661
+ again (native scrollback + the masthead boot + smaller redraws). Fullscreen stays opt-in via `--fullscreen`
662
+ / `KODE_FULLSCREEN=1` / `settings.ui.fullscreen:true`; its alt-screen boot + redraw need work before it can
663
+ be default. (The empty-space-at-idle it was meant to fix is inline-inherent and fills as you work.)
664
+ - **AI-agnostic, fleet-portable model config** (`modelMode` + `fleet.auroraNodes`). Every node picks its
665
+ model source in `settings.json`: `"local"` (default — this node's own drop-in model at
666
+ `endpoints.aurora.base`) or `"aurora"` (the shared fleet Aurora hybrid: JL1 primary → JL2 failover). The
667
+ engine never names a model or node in code; dropping in a different model or adding a serving node is a
668
+ one-line config edit (`KODE_MODEL` / `KODE_MODEL_MODE` env, or settings). New `docs/MODEL-CONFIG.md`;
669
+ `resolveModelMode()` + tests in `test/settings.test.mts`. Full suite: 496 passed, 0 failed (68 files); `tsc` clean.
670
+
671
+ ## 0.1.96 — 2026-09-26 — fullscreen by default: composer pinned to the bottom (no dead space)
672
+ - **Fixes the "dead space at the bottom" (reported repeatedly).** Inline mode renders content-height, so on
673
+ a short/idle session the composer sat high with the terminal blank below it. Fullscreen (alt-screen) pins
674
+ the status rule + composer + footer to the **bottom** of the terminal and fills the transcript upward —
675
+ no dead space. Verified by screenshot (idle: composer at the floor, ctx ring visible in the status rule).
676
+ - **Fullscreen is now the default** enterprise layout. Opt back to inline (native terminal scrollback +
677
+ copy) with `operator --inline`, `KODE_FULLSCREEN=0`, or `settings.ui.fullscreen: false`. Tradeoff:
678
+ alt-screen bounds the in-app transcript view (older entries scroll off; the full turn is still in the
679
+ session log / resumable). Full suite: 495 passed, 0 failed (68 files); `tsc` clean; app-fullscreen render test covers it.
680
+
681
+ ## 0.1.95 — 2026-09-26 — session hygiene: completed plan clears + sub-agent runaway cap
682
+ - **A fully-completed plan pane now clears itself** instead of lingering. Once every step is `done` the pane
683
+ has no live value; the per-step ✓ already showed as each landed, so the finished list drops away rather
684
+ than occupying the frame (reported live). New test in `test/planpane.test.mts`.
685
+ - **Background sub-agents get a hard round cap (50)**, vs the foreground's 200. A focused delegated task
686
+ (review / a specific fix) that reaches 50 rounds isn't converging — it's re-exploring with different
687
+ commands each round, which the progress-gated stall guard reads as progress and never stops. Seen live
688
+ 09-26: two review sub-agents ran to round 42+/31 (30+ min each) on a saturated Aurora while two more sat
689
+ queued behind them forever. The cap bounds a runaway well below the foreground ceiling. (`session.ts`
690
+ threads `maxRoundsHard`; `cli.tsx` sets 50 for the background Session.)
691
+ - Full suite: 495 passed, 0 failed (68 files); `tsc` clean.
692
+
693
+ ## 0.1.94 — 2026-09-26 — kill TUI flicker under streaming/swarm + ctx fill-ring (TUI correctness)
694
+ - **Fixes flicker (seen 09-26, v0.1.92).** During a fast reply or a multi-agent swarm, the dynamic frame
695
+ (plan + background panes + live tail) redrew dozens of times/second — Ink re-renders the WHOLE non-Static
696
+ frame on every state change, and the stream updated state **per token** (`setLive`/`setLiveTok`) while the
697
+ background pane updated on **every sub-agent token** (`setBgAgents`). A tall frame + that update storm =
698
+ visible flicker.
699
+ - **Fix:** new `throttle()` util (`src/util/throttle.ts`) coalesces those hot updates to ~15fps (one redraw
700
+ per ~64–90ms) with a guaranteed trailing flush, so the final frame always lands. Wired into the live
701
+ stream (token accumulator flushed on a throttled tick) and the sub-agent panel. Redraw rate during a
702
+ swarm drops from dozens/s to ~15/s — no flicker, identical final output. Tested in `test/throttle.test.mts`
703
+ (leading + single-trailing coalescing, latest-value capture).
704
+ - **ctx fill-ring:** the status rule now shows context usage as a fill ring `○◔◑◕●` next to the %, so how
705
+ full the window is reads at a glance (wires the catalog's `ring()` primitive into the status bar).
706
+ - Full suite: 494 passed, 0 failed (68 files); `tsc` clean. Verified live on JL1 via a real headless
707
+ Operator work-session (built + ran + verified a CLI end-to-end on JL1's Aurora).
708
+
709
+ ## 0.1.93 — 2026-09-26 — stop the live-tool pane flooding scrollback with ghost lines (TUI correctness)
710
+ - **Fixes a live regression (seen 09-26, v0.1.92).** On a long turn with many parallel tool batches, the
711
+ transcript flooded with faint full-width "rule" lines that stacked until the screen was unusable and hard
712
+ to scroll. Root cause: the live **"running N tools in parallel"** pane (and, latently, the `plan` and
713
+ `background` panes) rendered a **rounded box border in Ink's dynamic (non-`Static`) region**. In inline
714
+ mode every time the `Static` transcript grows mid-turn Ink re-lays the dynamic frame and **orphans the
715
+ box's top/bottom border rows into scrollback** — dozens of ghost lines over a multi-batch turn.
716
+ - **Fix:** the three dynamic-region panes (`App.tsx` live-tools, `PlanPane`, `BgPanel`) are now **borderless**
717
+ (dim header + left indent for grouping) — no border rows to orphan. The settled cards (Summary/Stats) are
718
+ `Static`-rendered and were never affected. Full suite: 491 passed, 0 failed (67 files); `tsc` clean.
719
+ - **Also:** fixed `package.json` `publishConfig.registry` (was `registry.npmjs.org`, where there's no token)
720
+ → `https://pkg.axe.onl`, the fleet registry, so a bare `npm publish` routes correctly (no `--registry` flag).
721
+
722
+ ## 0.1.92 — 2026-09-26 — recover a truncated tool call instead of a failover storm (engine correctness)
723
+ - **Fixes a live crash (seen 09-26, v0.1.80).** When the model emitted one over-long tool call — a whole
724
+ ~8KB file written in a single `file_edit` `new_string` — generation hit the output-token cap MID-string,
725
+ leaving the tool-call JSON unterminated. llama.cpp's server rejected it (`aurora /v1 500: Failed to parse
726
+ tool call arguments as JSON: missing closing quote` / `Unterminated string in JSON`). The engine treated
727
+ every 500 as transient → blind endpoint failover, which is **futile** (the next endpoint truncates the
728
+ same write) and cascaded into `[turn error: fetch failed]` and a dropped session.
729
+ - **Fix — give this 500 its own recovery class.** `selfheal.classifyFailure` now returns
730
+ `truncated_tool_call` for a 4xx/5xx whose body says the server couldn't parse the model's own tool-call
731
+ arguments. The agent loop handles it by injecting a short **chunk-the-write nudge** and retrying the SAME
732
+ endpoint (no route switch, failover budget untouched); after `MAX_TRUNC_RETRIES` (2) it surfaces the error
733
+ honestly rather than looping. Root cause attacked (model strategy), not the symptom (which server answered).
734
+ - **Headroom.** `clampMaxTokens` floor raised 512 → 1024 so a tool-calling round keeps room to finish a full
735
+ tool call's arguments instead of truncating mid-JSON — reducing how often the recovery is needed at all.
736
+ - Touched `src/engine/selfheal.ts` + `src/engine/agent.ts` + `src/engine/compaction.ts`; new
737
+ `test/truncated-toolcall.test.mts` (classifier + in-place recovery with no failover + retry-cap surfacing).
738
+ Full suite: 491 passed, 0 failed (67 files); `tsc` clean.
739
+
740
+ ## 0.1.91 — 2026-09-26 — tree views (```tree fenced blocks) (TUI wave item)
741
+ - **A ```tree code block renders as a connector-drawn tree** (├─ └─ │) instead of flat text — for file
742
+ layouts, dependency trees, structure outlines. Trigger is explicit (the `tree` fence language), never
743
+ guessed; indent (2 spaces or a tab per level) sets depth. Box-drawing glyphs, Terminal.app-safe.
744
+ - New `src/ui/tree.ts` (pure `renderTree`) wired into `Markdown.tsx`; tested in `test/tree.test.mts`
745
+ (sibling connectors, │ risers, deep chains, blank-line handling). Full suite: 488 passed, 0 failed (66 files).
746
+
747
+ ## 0.1.90 — 2026-09-26 — /stats session dashboard (cost + throughput) (TUI wave item)
748
+ - **New `/stats` command** pushes a session dashboard card: turns · tool calls · cumulative tokens · avg
749
+ decode tok/s, a **throughput sparkline** (per-turn tok/s trend — so the ~56 tok/s config bottleneck is
750
+ visible over time), and a **context-fill bar** (amber past 80%). Exercises the chart primitives.
751
+ - New `src/ui/StatsCard.tsx` + a `stats` transcript entry kind; per-turn tok/s tracked in the CLI. Pure
752
+ `statsLine()` + render tested in `test/statscard.test.mts`. Full suite: 484 passed, 0 failed (65 files).
753
+
754
+ ## 0.1.89 — 2026-09-26 — terminal charts (sparkline/bar/ring) + plan-pane progress bar (TUI wave item)
755
+ - **Chart primitives** (`src/ui/chart.ts`): `sparkline(values)` (8-level block trend), `bar(value,max,width)`
756
+ (filled/empty progress bar), `ring(pct)` (5-step quarter-glyph dot) — the drawing primitives for the
757
+ richer panes (plan progress, sub-task bars, a future cost/throughput dashboard). Pure, BMP-safe, tested.
758
+ - **Plan pane now shows a progress bar** next to its `n/total done` header (e.g. `plan · 2/5 done ████░░░░`),
759
+ so you see completion at a glance. Full suite: 481 passed, 0 failed (64 files).
760
+
761
+ ## 0.1.88 — 2026-09-26 — bidirectional sub-agent coms (message a running agent)
762
+ - **The sub-agent channel is now two-way.** Before, `spawn_agent` was one-way (brief in, result out). New
763
+ **`message_agent(id, text)`** tool lets the foreground send a message to a STILL-RUNNING sub-agent —
764
+ steer it, add context it now needs, or answer a question — and the child receives it as a follow-up turn
765
+ in its own conversation and keeps going. (The child→parent direction was already live: the background
766
+ panel streams each agent's steps + reasoning, and it posts its result when done.)
767
+ - Mechanism: `BackgroundAgents.sendToAgent(id, text)` enqueues into a per-agent inbox; the run loop drains
768
+ the inbox as follow-up sends before finishing (bounded to 6, so a chatty parent can't loop a child).
769
+ Returns false for a finished/unknown agent so the parent knows the message didn't land. Wired via a
770
+ `messageAgent` Session callback → `message_agent` tool (foreground only, like `spawn_agent`).
771
+ - Test: `test/agent-coms.test.mts` (a queued message becomes a real follow-up turn; finished/unknown agents
772
+ reject). Full suite: 478 passed, 0 failed (63 files).
773
+
774
+ ## 0.1.87 — 2026-09-26 — background sub-agents edit in an isolated git worktree (no more shared-tree races)
775
+ - **Fix for a live hazard:** a foreground turn and a background sub-agent were both editing the same file
776
+ in the same working tree at once. Now a **file-editing** background agent (task type `code-edit`) runs in
777
+ its **own git worktree on its own branch**, branched from HEAD — its edits are quarantined there and can't
778
+ touch the foreground tree. When it finishes, its changes are committed onto the branch and the worktree is
779
+ removed, so the work survives as a reviewable branch (`git diff HEAD..operator/<id>`), surfaced in the
780
+ agent's done-summary. Read-only lanes (search/review/plan) still share the live cwd (they *should* see the
781
+ real tree). Best-effort: not a git repo → no isolation, runs in the shared cwd as before.
782
+ - Mechanism: `Executor` gains an optional `root` that reroots each tool call — relative file paths resolve
783
+ under the worktree, command tools default their `cwd` there (absolute/`~` paths untouched). `Session` takes
784
+ a `cwd`; `BackgroundAgents` creates/finalizes the worktree per code-edit child; verify-before-done runs
785
+ *in* the worktree. Toggle with `settings.background.worktree` / `KODE_BG_WORKTREE=0`.
786
+ - New `src/tools/executor.ts rootArgs` + `src/background/worktree.ts`; tests: `test/executor-root.test.mts`
787
+ (pure rooting) and `test/worktree.test.mts` (real git — proves isolation + branch handoff). Full suite:
788
+ 476 passed, 0 failed (62 files).
789
+
790
+ ## 0.1.86 — 2026-09-26 — plan / checklist pane (TUI wave item)
791
+ - **The session TODO list now renders as a live checklist pane.** When Operator tracks multi-step work via
792
+ `task_add`/`task_update`, a bordered pane shows each item with a status glyph (☐ pending · ◐ in-progress ·
793
+ ☑ done, done items struck through) and a `plan · n/total done` header — so you can watch it work the plan,
794
+ the way a person follows a todo list. Sourced from the engine store (`registry.getAgentTasks`), refreshed
795
+ after any `task_*` tool; collapses to nothing when there are no tasks.
796
+ - New `src/ui/PlanPane.tsx` + `PlanTask` type; pure `planProgress()` + render tested in
797
+ `test/planpane.test.mts`. Full suite: 469 passed, 0 failed (60 files).
798
+
799
+ ## 0.1.85 — 2026-09-26 — phase line + esc-to-interrupt hint (TUI wave item 04)
800
+ - **A dim phase line during any active turn** names what Operator is doing right now — `reasoning`,
801
+ `writing`, `running tools`, or `recovering` — and always reminds you `· esc to interrupt`. So a long turn
802
+ never leaves you wondering what it's on or how to stop it. Bounded to one line (no frame-height risk).
803
+ - Full suite: 466 passed, 0 failed (59 files).
804
+
805
+ ## 0.1.84 — 2026-09-26 — end-of-turn summary card + verify badge (TUI wave item 06)
806
+ - **A compact summary card now lands after every turn that did work** (used ≥1 tool): wall time · output
807
+ tokens @ decode tok/s · prefill · rounds · tools, in a rounded card. Pure Q&A turns skip it (no noise).
808
+ - **Verify badge:** the card lights an amber "⚠ changed files · not verified (no passing check ran)" line
809
+ when the turn mutated files but the verify-before-done gate saw no passing check — so an unverified change
810
+ is never silent. `unverified` now flows AgentTurnResult → TurnOutcome → the card.
811
+ - New `src/ui/SummaryCard.tsx` (Static-rendered) + a `summary` TranscriptEntry kind; pure `summaryLine()`
812
+ tested in `test/summarycard.test.mts`. Full suite: 466 passed, 0 failed (59 files).
813
+
814
+ ## 0.1.83 — 2026-09-26 — syntax-highlighted code fences (TUI wave item 07)
815
+ - **Fenced code in answers is now syntax-highlighted** like an editor instead of flat monochrome — the most
816
+ visible win for a coding agent whose output is mostly code. Keywords → accent, calls → info/cyan, strings
817
+ → green, numbers → amber, comments → dim. Language comes from the fence info string (```python, ```ts,
818
+ ```bash, …); the `#`-vs-`//` comment style follows the language.
819
+ - Dependency-free, line-based heuristic tokenizer (`src/ui/highlight.ts`) — terminal display, not a lexer,
820
+ with a hard invariant (verified) that tokens always reassemble to the exact source line, so no character
821
+ is ever dropped or duplicated. Colors are applied by `Markdown.tsx` from the theme palette. Pure
822
+ `tokenize()` tested in `test/highlight.test.mts`. Full suite: 463 passed, 0 failed (58 files).
823
+
824
+ ## 0.1.82 — 2026-09-26 — loop guard no longer kills productive work that narrates repetitively
825
+ - **Found by a real-world drive of the actual engine (not a unit test):** a small local model narrates
826
+ repetitively ("writing the next module") while doing genuinely different work each round. The cross-round
827
+ loop guard keyed on the PROSE ALONE, so it counted those distinct-work rounds as a loop and stopped the
828
+ turn at round 3 — almost certainly the deeper cause behind the "same line over and over" a build showed.
829
+ - **Fix:** the guard now signs the WHOLE round — narration + the tool calls it drives (name+args). Distinct
830
+ work (mod1, mod2, mod3 — different args) yields distinct signatures and never accumulates; only an
831
+ identical round (same prose AND same action, or repeated prose with no action) trips it. A genuine loop
832
+ still stops at 3, even when the tool "progresses" (returns non-empty). Regression tests added to
833
+ `test/agent-progress-cap.test.mts`; verified end-to-end by driving `runTurn` + the real tool executor
834
+ against a scripted model that writes 12 real files while repeating its narration — it now runs to
835
+ completion. Full suite: 456 passed, 0 failed (57 files).
836
+
837
+ ## 0.1.81 — 2026-09-25 — stop stamping the same narration once per tool in a parallel batch
838
+ - **Fixed the repeated "let me check…" line** that appeared once per tool during a parallel batch (looked
839
+ like 5 tools each emitting the same sentence). Cause: the model's just-streamed interstitial narration
840
+ stayed in the LIVE frame while N parallel tools settled one-by-one; each settle re-rendered a tall frame
841
+ (narration + the N-row tool box) that Ink's erase-by-line-count could mis-handle, stamping the prose into
842
+ scrollback once per tool. Fix: clear the live narration at `onToolStart` — during execution the frame is
843
+ just the bounded tool rows, so there's nothing tall to re-stamp. The prose still shows while it streams;
844
+ the final answer is unaffected (it's pushed once at turn end). Full suite: 456 passed, 0 failed (57 files).
845
+
846
+ ## 0.1.80 — 2026-09-25 — opt-in fullscreen layout (composer pinned to the bottom)
847
+ - **Fullscreen mode** for anyone who wants the composer anchored at the bottom instead of the inline layout's
848
+ unused space below a short conversation. OFF by default. Enable per-run with `--fullscreen`, per-env with
849
+ `KODE_FULLSCREEN=1`, or persistently with `settings.ui.fullscreen: true`.
850
+ - On: switches to the terminal's ALTERNATE screen buffer, the transcript fills a clipped, bottom-anchored
851
+ region (a non-Static tail — `Transcript bounded`), and the status rule + composer + footer sit pinned at
852
+ the very bottom. On exit the main buffer is restored, so the terminal comes back exactly as it was
853
+ (vim/less style).
854
+ - Tradeoff (why it's opt-in): alt-screen forgoes the terminal's native scrollback + select/copy of past
855
+ output that the default inline layout keeps. Try it, keep it if you like it.
856
+ - Default inline layout is unchanged. Render-tested (`test/app-fullscreen.test.mts`). Full suite: 456 passed,
857
+ 0 failed (57 files).
858
+
859
+ ## 0.1.79 — 2026-09-25 — rich answers: markdown tables, task-lists/quotes/rules/links + composer footer
860
+ - **Markdown tables in answers** (`src/ui/Table.tsx`, TUI wave item 02). A `| a | b |` / `|---|` block now
861
+ renders as a box-drawn, column-aligned table (`┌┬┐│├┼┤└┴┘`) with GFM alignment (`:--` left, `--:` right,
862
+ `:--:` center). Column widths auto-fit the terminal — the widest columns shrink first (never below 3
863
+ cells, truncating with `…`) so a wide table never wraps and creeps the frame. Width math reuses the
864
+ status rule's `cellWidth`/`truncateToWidth`, so a double-width glyph never skews a column. Rendered only
865
+ on settled entries (Static-safe). Pure parse/align/fit/pad logic tested in `test/table.test.mts`.
866
+ - **Richer markdown** in assistant output (`src/ui/Markdown.tsx`, wave item 03): task lists (`- [ ]`→☐,
867
+ `- [x]`→☑ green), `>` blockquotes (dim bar), `---`/`***`/`___` horizontal rules, `[text](url)` links and
868
+ bare URLs rendered clickable via OSC 8 (degrade to `label (url)` where unsupported), and headings/inline
869
+ code now use the theme palette.
870
+ - **Composer footer** — the `◆ auto · shift+tab to cycle` mode hint now renders BELOW the input rule (a
871
+ footer under the composer) instead of inside the input zone, so the input reads as its own clean band.
872
+ - Full suite: 455 passed, 0 failed (56 files).
873
+
874
+ ## 0.1.78 — 2026-09-25 — don't quit mid-build + TUI theme tokens (one palette, capability-aware)
875
+ - **The turn no longer stops a productive build mid-mission.** A live session building a Python CLI was
876
+ cut off at round 11 with "[stopped after 11 tool rounds — the task may be unfinished]" while it was
877
+ actively writing files. Two compounding root causes, both fixed:
878
+ - **A silent-but-successful shell command was miscounted as a stall.** The model built the CLI with
879
+ `cat > f <<EOF` heredocs; a heredoc that writes a file and prints nothing returns `(no output)` (an
880
+ exit-0 success), but `batchProgressed` (agent.ts) treated *any* `(no output)` as "no progress." Six
881
+ such rounds in a row tripped `NO_PROGRESS_LIMIT`. Now only a **failed** silent command
882
+ (`(no output; exit N)`), an error, or the loop guard counts as a stall — a bare `(no output)` is
883
+ progress. (`write`/`edit` return `wrote …`/`edited …`, so they were never the issue.)
884
+ - **The foreground turn used the hardcoded soft budget of 10, not the configured 40.** `settings.
885
+ autonomy.maxRounds` (40) is now threaded through `Session` into `runTurn` for interactive turns too,
886
+ so the progress-guard doesn't even engage until round 40. It remains a floor on effort, not a hard
887
+ cap — the engine still auto-continues while progressing and hard-stops only on a genuine stall or the
888
+ absolute 200-round ceiling. Regression tests in `test/agent-progress-cap.test.mts`: a silent-success
889
+ build runs to completion; a failed-silent command still stalls.
890
+ - **TUI: one theme palette (`src/ui/theme.ts`), capability-aware.** Every component pulled its own
891
+ hex/named colors (the brand star was `magenta` in one place, `magentaBright` in another). Now a single
892
+ set of semantic tokens (accent, info, success, error, warn, running, starBright, textBright, muted) with
893
+ a three-tier fallback ladder: truecolor/256 → the brand hex, 16-color → a named ANSI fallback (not
894
+ chalk's muddy auto-downsample of a brand purple), `NO_COLOR`/`KODE_NO_COLOR` → no escapes, and a
895
+ `KODE_THEME=high-contrast` mode → bright named colors. Output is byte-identical at truecolor; the win is
896
+ one source of truth plus real low-color/high-contrast behavior. Adopted across Header, StatusRule,
897
+ ToolStep, BgPanel, ActivitySpinner, ThinkingSpinner, and the Masthead gradient. Tests: `test/theme.test.mts`.
898
+ - Full suite: 448 passed, 0 failed (55 files).
899
+
900
+ ## 0.1.77 — 2026-09-25 — sub-agent verify actually RUNS the command (kill the hollow verify)
901
+ - **The orchestrator now executes, it doesn't just ask.** `grandmaster.verifyFinalAnswer` previously only
902
+ stat'd that claimed files exist and *surfaced* the `verify_command` for the child to run — so a
903
+ sub-agent's `verified` was a self-report (the same hollowness that let "37/37, engine works" through).
904
+ Now it RUNS the declared `verify_command` and gates `verified` on the real exit code, reusing the
905
+ main-loop allowlist/parser (`isVerifyCmd`/`ranButFailed`): a recognized test/build/run that exits 0 =
906
+ verified; a failure, a non-recognized/absent command (echo/true/none), or a missing file = **not
907
+ verified**. This is the foundation an adversarial reviewer lane needs — the harness owns the truth, not
908
+ the 56 tok/s model's say-so. `bash -lc` with a 180s timeout; child_process loads lazily (neutral bundle
909
+ unaffected). Behavioral test: `test/grandmaster-verify.test.mts`.
910
+ - Designed via an adversarial design-critic pass that caught the naive "reviewer sub-agent" would be a
911
+ *second* rubber stamp (same model, same cwd, no exec) — so we built the exec foundation first. The
912
+ isolated read-only reviewer lane + synchronous verdict-gating are the next steps.
913
+
914
+ ## 0.1.76 — 2026-09-25 — TUI: clickable paths + instant --version/--help
915
+ - **OSC 8 hyperlinks** (`src/ui/osc.ts`): tool-step file paths (`path`/`file`/`filename` args) are now
916
+ clickable — click a path to open it in your editor, on terminals that support it (iTerm2 ≥3.5, Ghostty,
917
+ WezTerm, Kitty, VS Code). Degrades safely everywhere else (macOS Terminal.app renders the plain label;
918
+ the escapes are zero-width to Ink's string-width, so columns/truncation stay correct). Non-TTY output
919
+ stays plain; `KODE_NO_HYPERLINKS=1` disables. Pure, unit-tested (`test/osc.test.mts`).
920
+ - **`operator --version` / `--help` fast-path**: handled before Ink/React mounts — instant, and `--version`
921
+ now works with no TTY (it previously errored asking for an interactive terminal).
922
+ - Grounded in a TUI-advancements research pass that confirmed per-token repaint is already handled
923
+ (`<Static>` + Ink's 32ms write throttle) — so no effort went to the hot path. Next: Synchronized Output
924
+ (DEC 2026) for atomic, flicker-free frame painting on modern terminals (needs a write-coalescing stdout
925
+ proxy + visual confirmation).
926
+
927
+ ## 0.1.75 — 2026-09-25 — background sub-agent concurrency cap (never overload the host)
928
+ - **An agent must never kill its own node.** A live session fanned out 4 concurrent `aurora-code-1`
929
+ background sub-agents on top of Aurora serving on one 64GB box and starved it clean off the network
930
+ (ping/SSH/Aurora port all dead ~1h). `BackgroundAgents` now caps concurrently-running sub-agents
931
+ (default **2**, `settings.background.maxConcurrent` / `KODE_BG_MAX`): excess spawns enter a **`queued`**
932
+ state and are promoted the instant a running slot frees (on completion or stop). The panel shows queued
933
+ agents (`◌`), and the queue wait isn't counted as run time. Behavioral test in
934
+ `test/background-concurrency.test.mts` (3 spawns at cap 2 → 2 working + 1 queued → promoted on release).
935
+ Frontier-parity reliability: bounded fan-out is table stakes for an agent that runs unattended.
936
+
937
+ ## 0.1.74 — 2026-09-25 — git operations upgrade (stop the raw-git flailing)
938
+ - **Structured `git_status` tool + a persona steer.** A live session watched Operator loop on raw
939
+ `bash(git status/add/diff)` — misreading porcelain, re-running the same commands, and confused when an
940
+ already-committed tree showed "nothing to add" — until the loop guard cut it off. Fix: a read-only
941
+ `git_status` tool that returns ONE clean summary (branch, ahead/behind vs upstream, staged/unstaged/
942
+ untracked lists), with a clean tree stated plainly as **"nothing to commit" = success** so the model
943
+ stops spelunking. New "## Git" persona rule steers to `git_status` (don't loop on raw git; a clean tree
944
+ is success) and to commit via `git_command`/`checkpoint` with explicit paths + conventional message.
945
+ Parser (`src/tools/git-status.ts`) is pure + unit-tested (`test/git-status.test.mts`).
946
+
947
+ ## 0.1.73 — 2026-09-25 — AXE engineering self-check baked into the persona
948
+ - **The fleet SOP, as active guidance in Operator's own head.** Added a compact "How I work — the AXE
949
+ self-check" section to `src/config/persona.ts`: before acting, state the ROOT CAUSE (not the symptom)
950
+ and reuse the nearest existing pattern (a new one needs a reason); stay scoped; match the surrounding
951
+ code so the work is indistinguishable from the repo owner's; log the non-obvious WHY to the repo's
952
+ `_ai-docs/`; commit clean (conventional `type(scope): subject`, explicit paths, no AI/Co-Authored-By/
953
+ Claude-Session trailers). The "before done" leg is already covered — and *harness-enforced* — by 0.1.70
954
+ (verify by running) + 0.1.71 (the verify-before-done gate), so this is deliberately non-duplicative.
955
+ Full reference shipped at `docs/operator-selfcheck.md`; fleet SOP of record is `~/.axe/AXE-ENGINEERING-SOP.md`.
956
+ Guarded by `test/persona.test.mts`. (Coordinated with the fleet SOP rollout in memjar/nimbus.)
957
+
958
+ ## 0.1.72 — 2026-09-25 — accurate live token counts (main + sub-agents)
959
+ - **Live token readout now shows the real count.** The live counter (main spinner AND the background
960
+ sub-agent panel) incremented ≈1 per streamed content delta — so it missed every token generated as a
961
+ tool-call argument or reasoning. A sub-agent writing skill files (all tool-arg output) read as "53 tok"
962
+ after 9 minutes; the main agent orchestrating sub-agents sat frozen at "220 tokens"; nothing ever
963
+ crossed 999. Now a new `onTokens` callback carries the authoritative llama.cpp per-round count
964
+ (`predicted_n`, summed) and the hosts display THAT — so the number matches what the model actually
965
+ generated and climbs into the thousands as it should.
966
+ - `src/engine/agent.ts`: fire `onTokens(cumulativeOutputTokens)` after each round.
967
+ - `src/session.ts`: thread it through `TurnHandlers` → `runTurn`.
968
+ - `src/cli.tsx`: the main live counter snaps to the real total each round (delta stream still animates
969
+ between rounds).
970
+ - `src/background/index.ts`: the sub-agent panel shows the real running total, not the ≈1/delta tally.
971
+ - Regression guard in `test/agent-toolheavy-tokens.test.mts` (onTokens fires per round, cumulative,
972
+ final == turn total).
973
+
974
+ ## 0.1.71 — 2026-09-25 — harness-enforced verify-before-done
975
+ - **The gate that makes 0.1.70 real.** Persona rules are ignorable on a weak model; this makes "done" a
976
+ fact the harness *computes* from observed tool execution, never a phrase the model emits. When a turn
977
+ changed files (`file_write`/`file_edit`) but no verify-shaped command was seen to pass, the main loop
978
+ injects ONE reminder to run the real check and gives the model another round; if it still doesn't, the
979
+ answer is finalized with a `⚠ Not verified` banner and the trajectory is withheld from the flywheel.
980
+ - **Predicate = allowlist** of verify command heads (`npm/pnpm/yarn/bun/npx/node/tsc/vitest/jest/pytest/
981
+ go/cargo/make/…` + running a local `./script`), so `echo`/`cat`/`ls`/`true`/`grep`/`test -f`/`git` are
982
+ excluded for free — which catches the SGE incident deterministically (its file-exists "tests" are not
983
+ verifications). Pass/fail keys on a newly-surfaced exit code.
984
+ - **Plumbing fix:** `tools/registry.ts` `shellExec` dropped the exit code whenever a command printed
985
+ output, so a failing `npm test` was indistinguishable from a pass. Now appends `[exit N]` on nonzero
986
+ (exit-0 output unchanged) — the model and the gate can both see failure.
987
+ - **Flywheel tie-in:** a claimed-but-unverified code turn is no longer `graded` — the fleet stops
988
+ training on hollow "done".
989
+ - New `src/engine/verify-gate.ts` (pure, neutral-bundle safe) + `src/config/settings.ts`
990
+ `verifyGate {enabled:true, maxNudges:1}` (`KODE_VERIFY_GATE=0` to disable). Behavioral tests in
991
+ `test/verify-gate.test.mts`; design in `docs/verify-before-done.md`. Designed by a four-lens
992
+ master-agent panel (loop placement · minimal mechanism · behavior contract · validation+flywheel).
993
+
994
+ ## 0.1.70 — 2026-09-25 — verify by running before you claim done
995
+ - **Persona: never self-certify without running it.** Operator's base system prompt now forbids reporting
996
+ that something "works / passes / is complete" on reasoning alone — it must execute the actual command,
997
+ CLI, or code path and read the result, and its tests must assert BEHAVIOR, not just that files exist
998
+ ("green tests that assert nothing are not proof"). Prompted by the same live session that shipped a
999
+ Skill Graph Engine reported as "engine works · 37/37 · Phase 1 complete" when — verified by an adversarial
1000
+ review that actually ran it — the CLI didn't parse on any bash, the graph resolver returned empty for
1001
+ every skill (an edge-type `depends` vs `depends_on` mismatch), and all 37 tests were `[ -f ]`/`jq empty`
1002
+ existence checks. This is the CAPTURE-side complement to 0.1.69: fix what you find, and prove it ran.
1003
+ Guarded by `test/persona.test.mts`.
1004
+
1005
+ ## 0.1.69 — 2026-09-25 — fix-what-you-find (stop asking, start fixing)
1006
+ - **Persona: fix defects on your own initiative instead of asking.** Operator's base system prompt
1007
+ (`src/config/persona.ts`) now states, as a first-class rule, that when it finds a bug while doing or
1008
+ testing its own work it FIXES the clear/mechanical/high-severity ones and re-runs the check that proves
1009
+ the fix — it does NOT pause to ask "should I fix these?", and does NOT advance to the next phase/task
1010
+ while known bugs from the current one are still unfixed (which risks leaving them unfixed forever). Only
1011
+ genuine judgment calls (design decisions, real tradeoffs, destructive/irreversible actions) go back to
1012
+ the user. Prompted by a live session that found 9 bugs, fixed none, and asked whether to fix or jump to
1013
+ Phase 2. Guarded by `test/persona.test.mts`.
1014
+
1015
+ ## 0.1.63–0.1.68 — 2026-09-25 — reliability sweep + self-improvement loop
1016
+ Shipped from live Operator sessions on JL2. Newest first within the batch.
1017
+ - **0.1.68 — self-improvement loop, out of the box.** Every completed turn appends a graded trajectory to
1018
+ `~/.axe/operator/flywheel/<date>.jsonl` (`input/content/rounds/toolCalls/tokens/model/cwd`; `graded=true`
1019
+ when it produced content, ran ≥1 round, and wasn't cut for repetition). This is the CAPTURE side the
1020
+ fleet's `recursive_self_improve.py` training loop consumes — nothing recorded real CLI turns before.
1021
+ Default-on, best-effort, never blocks; opt out with `KODE_SELFIMPROVE=0`. Memory/skill/reflection sinks
1022
+ scaffolded on the same per-turn hook (`settings.selfImprove`); reflection off by default (an extra
1023
+ generation per turn hurts local-model latency).
1024
+ - **0.1.67 — clear on terminal resize.** Minimize/resize desynced Ink's erase-by-line-count bookkeeping, so
1025
+ every later re-render (keystroke, 250ms clock) APPENDED the status rule instead of overwriting it. A
1026
+ debounced `clear()` on stdout resize re-syncs to the real terminal.
1027
+ - **0.1.66 — failover auto-recovery.** A session that failed over to the standby never climbed back — the
1028
+ router scanned forward from the failover index and never consulted health. Now a circuit-breaker with a
1029
+ 45s cooldown climbs back to primary once healthy, via a size-floor kept separate from failover.
1030
+ - **0.1.65 — readable sub-agent labels.** Labels were the first 28 chars of the raw "You are building…"
1031
+ brief, so every agent chopped to the same boilerplate. Now derived from the actual objective.
1032
+ - **0.1.64 — cross-round narration loop guard + version from package.json.** A model re-emitting the
1033
+ IDENTICAL sentence each round while reading a different file looped 7+ min because the guard cleared on
1034
+ tool progress; now identical prose is counted regardless of progress. VERSION reads package.json at
1035
+ runtime so the splash can't drift from the published version.
1036
+ - **0.1.63 — exact token metering + hardened decode-loop guard.** `stream_options.include_usage` yields
1037
+ exact `completion_tokens` on tool-call rounds (was under-counting to ~0 → chars/4 fallback). Loop guard
1038
+ gained fuzzy-normalized + word-8gram + runaway-length detection for garbled/run-together repeats.
1039
+ - Also: fleet auto-install of companions (autopilot/chauffeur) sourced by IP not the drifting `JL1-2.local`
1040
+ mDNS name. Tests: 387/387.
1041
+
7
1042
  ## 0.1.62 — 2026-09-23
8
1043
  - **Naming: the internal model name is gone from every user-facing surface.** The only outward names are
9
1044
  "axe" / "Operator" / "0perator"; the internal model name never appears in anything a user sees.