Skip to content

Commit d50bc55

Browse files
committed
Merge remote-tracking branch 'origin/main' into cl-6933-reset-context-meter-on-new-clear-and-after-compaction
# Conflicts: # src/agent/compaction.test.ts # src/agent/compaction.ts
2 parents e4fb3cd + ed18557 commit d50bc55

110 files changed

Lines changed: 4734 additions & 1157 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,81 @@ parallel copies under `docs/` or `scripts/notes/`. At cut time: rename
1313

1414
## [Unreleased]
1515

16+
## [0.2.106] - 2026-08-23
17+
18+
### Agent
19+
20+
- **Resuming a session no longer shows a blank error when the saved history
21+
has one corrupted line.** A malformed or schema-invalid line anywhere in the
22+
saved transcript used to abort the entire resume load. The TUI's resume view
23+
now skips just the bad line (logging it) and still shows the rest of the
24+
history; a corrupt file still surfaces as an error during live conversation
25+
loading, where correctness matters more than availability.
26+
27+
- **Every stop and nudge is now logged, and so is what each dispatch produced.**
28+
`interventions.jsonl` in the worker's trace dir records each intervention with
29+
its measured value beside the threshold it crossed, the model family it fired
30+
on, and the run state at that moment — plus refused parent re-dispatches and,
31+
now, one outcome record per completed dispatch (the salvage kind or a
32+
clean-complete marker, plus the dispatch count). `bun run
33+
scripts/intervention-forensics.ts` aggregates them: counts by family, value
34+
distribution against threshold, two context columns (stops on runs that had
35+
already edited files, stops before half the turn budget — not a measured
36+
false-positive rate), and outcome counts by kind. Threshold changes can now
37+
cite data instead of judgment.
38+
39+
- **Shell file work counts as evidence.** A worker that edited with `sed -i`, a
40+
heredoc, or `>` redirection had `editedPaths` empty and salvaged as
41+
`never-edited` — a sticky hard block that then refused the parent an identical
42+
re-dispatch; one that read with `cat`/`head` salvaged as `incomplete-report`.
43+
Both are real work classified as no work. `run_shell` commands are now scanned
44+
for file reads and writes using the same subject expansion the auto-shell
45+
policy uses, so `bash -c` and `env -S` payloads are inspected rather than
46+
trusted.
47+
48+
- **Re-read pressure no longer stops a worker.** The `reReadLimit` thrash hard
49+
stop and its soft `re-read-nudge` are removed: reading one file four times
50+
while editing another, paging a large file, or re-running a grep to verify an
51+
edit could all end a healthy worker with a sticky hard block that refused
52+
re-dispatch. Fingerprint period detection already catches a genuinely
53+
repeating read cycle, on the evidence that it repeats. `src/subagent/thrash.ts`
54+
now only tracks read/edit evidence for the `intent=implement` and critique
55+
completeness checks, plus the near-budget wrap-up nudge.
56+
57+
## [0.2.105] - 2026-08-23
58+
59+
### Permissions
60+
61+
- **Every approval ask and how it settles is now logged.** `approvals.jsonl`
62+
in the session dir records each consequential decision — auto-mode
63+
allow/deny, or an operator prompt's allow-once / allow-with-scope / deny /
64+
timeout / abort — with the classifier rule that triggered it, queued /
65+
displayed / settled timestamps, and shell chain segment count. No command
66+
text, path, or credential is ever recorded; writes are fire-and-forget and
67+
never fail a run. `scripts/approval-forensics.ts` aggregates across local
68+
sessions.
69+
1670
### Agent
1771

72+
- **Context estimate syncs incrementally on append.** `syncFromTurns` keys
73+
prefix turns by object identity and estimates only the new suffix. A rewrite,
74+
shrink, or middle-turn identity break still fully recomputes so image-aging
75+
cannot leave a stale total.
76+
- **Thinking-only replay no longer collapses into an identical request.** Assistant turns with no text or tool_call (empty content, leftover thinking/citation) are replaced with a stable `[thinking-only turn omitted]` marker so the turn is kept, roles still alternate, and the next `buildRequest` body differs from the previous one.
77+
1878
- **Compaction keeps scored work, not retry loops.** Errored tool results are no
1979
longer auto-pinned; identical errors collapse to one representative. Anchors
2080
are scored (writes, successful task completions, plan updates) and pair
2181
closures count against `maxAnchorTurns`. The LLM summary is workflow-aware
2282
and skips degenerate assistant text.
2383

84+
- **Prefix-stable summaries and growth hysteresis.** Existing compacted user
85+
turns stay byte-identical across later passes; new folds become later summary
86+
turns with an assistant spacer so the prompt prefix can stay in the KV cache.
87+
After a compact that remains over the high watermark, the governor waits for
88+
usage to grow by 10% of the window before re-arming. Overflow recovery still
89+
compacts immediately.
90+
2491
### Plugins
2592

2693
- **`run_shell` no longer defaults to a 15s timeout.** Omitted timeout arms no
@@ -35,6 +102,21 @@ parallel copies under `docs/` or `scripts/notes/`. At cut time: rename
35102
unset; values must still be integers ≥1. `task(maxTurns)`, profile
36103
`maxTurns`, and `settings.subagentMaxTurns` may exceed 100 for long jobs.
37104

105+
### Internal
106+
107+
- **`inference.error` partials keep the provider error.** `partial.jsonl`
108+
records for `inference-error` now include `error` (`category`, `message`,
109+
`statusCode` when present) even when the cycle streamed no text.
110+
- **Exec `turnsUsed` follows the run-sink.** Mid-run and terminal `run.json`
111+
snapshots use `getTurnCount()` the same way the TUI does, instead of
112+
writing the initial zero until send finishes.
113+
114+
### Docs
115+
116+
- **`latest` is a symlink, not a session.** Naive globs of a project
117+
sessions directory double-count unless they skip `latest` (`listSessions`
118+
already does).
119+
38120
## [0.2.104] - 2026-08-23
39121

40122
### TUI

0 commit comments

Comments
 (0)