Skip to content

fix: 0.32.0 — less noise from the journal: strict recall, a one-line session start, hooks in the plugin - #69

Merged
Shahinyanm merged 5 commits into
mainfrom
fix/noise-and-latency
Nov 6, 2026
Merged

Shahinyanm merged 5 commits into
mainfrom
fix/noise-and-latency

Conversation

@Shahinyanm

Copy link
Copy Markdown
Member

The journal was putting a lot of text into the agent's context that had nothing to do with the work. Over 300 sessions, push-recall was added to tool results 13,696 times, mostly old decisions from other tasks matched on a single shared word. Every session start pasted three full resume packs with honesty scores and lists of files that no longer exist, every task_create reply carried a chronicle line, and the MCP instructions shouted in capitals.

Push-recall now fires only for the session's own task (or a task in the same module), only on what the agent or the user recorded, and only on a strong match: a shared file, issue or commit, or at least three meaningful words, more for a long command. Paths count as files, what an edit writes doesn't count at all, and UTF-8 is not an issue key. At most one hit per call, at most once every ten calls, never for the journal's own tools. It goes out as additionalContext for every tool: the async hook's updatedMCPToolOutput never reached the model and rewrote other servers' output.

The session start is one line: the open task this session most likely continues (its own after a resume or compaction, else the one the git branch names, else the latest) and how to resume it. Packs, honesty scores and chronicle gaps are on request.

The classifier used to file whole answers, raw tool calls, compaction summaries and task notifications as confirmed rejections, and that was most of what recall later pushed back. It no longer records them, and the keyword heuristic files a rejection only for an approach ruled out in so many words. The new task-journal cleanup-noise retires what is already stored with one correction per entry, stamped with the entry's own time so nothing moves in the newest-first views. A correction can't be taken back, so it only takes plain noise: a "rejection" that is a whole answer or a question goes, a short one stays whatever its wording. --dry-run writes every entry to a file, and --all writes only with --yes. On a copy of my journals it would retire 2,265 entries in 36 projects.

Claude Code hooks now ship in plugin/hooks/hooks.json: session start, push-recall and model switches, never the classifier queue. install-hooks for Claude Code takes the old ones out of settings.json after a backup, and only once it finds the installed plugin's hooks. Until then a hook left in settings.json stands down beside the plugin's, and a model switch is recorded once either way. /rewind typed in a prompt is no longer recorded on Claude Code. Codex is unchanged, except that the classic nudge now fires on a session's first prompt and every sixth after it.

The MCP instructions are seven plain lines.

The hooks were never the slow part: ingest-hook and nudge take 4–13 ms. The slow Stop and UserPromptSubmit hooks in those sessions belonged to other plugins.

Checked by replaying 40 real tool calls from one session through both binaries on a copy of the journal: 0.31.2 pushed 18 recalls, all from other tasks; this one pushes none. A new session on the same task got one recall in 20 calls, from that task. cargo test --workspace (749), clippy, fmt, doc and the mod tests (22) pass.

Details: CHANGELOG.md, section 0.32.0.

@Shahinyanm
Shahinyanm merged commit 402cb14 into main Nov 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant