Repository navigation
feat: show the Stop report as one line under the answer through the mod - #273
Merged
Merged
Conversation
breferrari
added this pull request to stack #272
October 3, 2026 08:26
breferrari
force-pushed
the
feat/266-mod-stop
branch
2 times, most recently
from
October 3, 2026 08:48
f351e7a to
8ed922c
Compare
breferrari
force-pushed
the
feat/266-mod-stop
branch
from
October 3, 2026 08:59
8ed922c to
599c919
Compare
breferrari
force-pushed
the
feat/266-mod-stop
branch
2 times, most recently
from
October 3, 2026 09:56
7d0f78c to
c4374bd
Compare
… dropped prompts keep the report, line after a lower hook's Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… hook Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s never lost or chained, one prompt takes the report, turn.complete tested at the hook Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… one urgent turn per prompt the person sends, any start but a compaction drops the queue Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gent turn per prompt, every start but a compaction drops it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gets what was shown, only an entered prompt renews the urgent allowance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eached the agent; compaction keeps report, shown identity and allowance, each pinned Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… allowance a flag; the Stop run held to the hook's own 5s; the Stop suite on the shared test world Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a resume in a new process does not repeat it; a report in flight across a /clear is not put back; the line's wording matches the hook's, 'now' when urgent; the mod's timeouts held to settings.json by a test; docs and READMEs to match Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ue unrun goes back to the queue (turn.start confirms delivery) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t enters is not undone by the put-back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p run drops the mod's queue so two reports never ride one prompt; a held prompt counts as run only as whole lines; the zh-CN README's garbled duplicate removed, and CI now refuses a second copy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e next (2.1.288) — every other prompt re-delivered the report; the store remembers delivered, so a report still waiting survives a resume in a new process Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rocess resume Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…turn.start, both redundant once delivery is remembered; the eviction test seeds delivered sessions so the cap matters Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
breferrari
force-pushed
the
feat/266-mod-stop
branch
from
October 3, 2026 10:26
c4374bd to
65d2168
Compare
breferrari
added a commit
that referenced
this pull request
Oct 3, 2026
…rrived (#274) ## What A delivery gate asks the model what session context it actually received, rather than checking that a hook ran. Stacked on #273; review only this diff. ## Why From Claude Code 2.1.89 until #254, hook output past 10,000 characters reached the model as a 2,000-character preview while every log said success. Every check here confirmed a hook **ran**, never what **arrived**, and the mod moves the context onto a young API. ## How `.github/scripts/delivery-gate.ts` runs real sessions in throwaway vaults. At each checkpoint the model quotes the context's last line **and** a marker from its middle, so a cut anywhere fails. | Session | Checkpoints | |---|---| | With the mod | startup; then after `/compact`, from a general-purpose subagent, after a second `/clear` | | Settings hooks alone | startup, after `/compact`, after `/clear` | - **`--trusted-dir`** builds each vault in a folder trusted once, so the mod is found as a user's is; otherwise `--plugin-dir`. - **Shifts:** with the mod, each `/compact` and `/clear` first moves the context's size and rewrites the marker; real compaction summaries repeat the old size, and only a fresh delivery has the new one. - **INVALID, never PASS:** any tool use, a summary or subagent prompt carrying the size or marker, a missing compact or clear event, a subagent that is not one general-purpose call reporting zero tools, a settings hook that printed when the mod should have delivered, a failed or extra turn. - **`--self-test`** runs two broken mods; every checkpoint must FAIL except a startup-only control. **`--file-issue`** files a failing run with its exact flags. ## Evidence Claude Code 2.1.288, Opus: ``` trusted folder --plugin-dir self-test (trusted) PASS 7 of 7 PASS 7 of 7 FAIL 7 checkpoints, control PASS exit=0 exit=0 exit=0 (the gate can fail) ``` The same 7 of 7 and self-test hold on Claude Code 2.1.287, the docs' minimum, and from a vault copied from infrastructure alone (the gate creates `brain/` itself). One self-test FAIL read "stale: it quoted the context from before the shift": the case the shift exists for. The judge: 40 tests on real 2.1.288 event shapes; 52 mutations, all killed. ## Merge danger **Door:** two-way. Nothing runs it automatically: CI on a public repository has no model credentials, so it runs before a release, as CONTRIBUTING says. **Blast radius:** contributors who run it: model turns on their account. Closes #267 Part of #262 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
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.
What
With the mod loaded, the Stop report becomes one line under the answer, and the agent gets the full report with the next prompt the person sends. Stacked on #271; review only this diff.
Why
The settings hook's Stop channels are all visible or all lost: a block reason prints as "Stop hook error",
additionalContextas "Stop hook feedback", and asystemMessagenever reaches the model. The mod has one per reader:turn.completedraws a line for the person,prompt.submitcontext reaches the model unseen.How
/clearVerification
A turn starts inside its own prompt's
next()(observed on 2.1.288), so the prompt is held as in flight beforenextis called. Held after it, the first live run re-delivered the report on every other prompt; the kit test now starts the turn insidenextacross six turns.--resumein a new process: a delivered report is not sent again, a waiting one arrives once.claude plugin test: 72 pass.npm test: 1649 pass, 0 fail. Demonstrated red: 41 mutations on the final code, all killed.Merge danger
Door: two-way. The plugin's store holds one small map of session ids.
Blast radius: Claude Code sessions with the mod. Without the flag, the settings hook is unchanged.
Closes #266
Part of #262
🤖 Generated with Claude Code