Repository navigation
Cut per-session context: th prime cap, gated handoff, quiet mail-guard - #772
Merged
Merged
Conversation
Every session started near 88k tokens, and th prime plus the plugin hooks re-injected bulk on each resume/compact. - th prime: cap the ready list at 10 (--ready-limit / TH_PRIME_READY_LIMIT) with a "+N more" line; terse primer instead of the command reference. - handoff-context/precompact: only pearls this session is on. In the primary checkout the old --cwd match pulled every pearl checkpointed there (96k chars in smooai main); now session-checkpointed or branch-named only, max 3 packets, each capped. - mail-guard stop: never block on an unarmed watcher with no direct mail (182 forced turns in ten days); direct-mail blocks once per count; the unarmed reminder is once-per-session prompt context. - th msg watch/unread-count --wake: broadcast notes/results no longer wake the watcher or count toward the nudge. - register-agent prints one line; rename FakeTool::new (clippy new_ret_no_self). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 027d870 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Sessions start at ~88k tokens.
th prime(~9.3k chars; ready list of 1470 pearls cut at 40), the compact/resume handoff hook (96k chars in the smooai main checkout, 36k in smooth main) andmail-guard.sh stop(182 forced extra turns in 10 days, mostly "no mail watcher armed") all add to it.Changes
--ready-limit N,$TH_PRIME_READY_LIMIT, 0 hides) +… +N more — run th pearls ready; terse primer that keeps the rules.relevant-pearls.sh. Linked worktree: unchanged. Primary checkout: only pearls this session checkpointed or whose id is in the branch. Max 3 packets × 1500 chars. PreCompact no longer stamps every pearl with the session id.--wakeonth msg watch/th msg unread-count: direct mail + broadcast request/handoff/cancel. Broadcast notes/results stay in the inbox but don't wake the watcher or count toward the nudge.watch-once.shpasses--wake, retrying without it on clap exit 2 (older th).FakeTool::new→buildinhooks/sidekick.rstests.Verification
cargo test: smooth-pearls mail_store 34 ok (new wake-count test); smooth-cli prime_tests + mail:: 34 ok (new cap + parse tests); smooth-daemon hooks::sidekick 6 ok. Clippy on the three crates: no errors.🤖 Generated with Claude Code