Repository navigation
feat(hooks): /experimental-context — keyed <revisit> entries re-injected after compaction - #132
Merged
Merged
Conversation
…njected after compaction Compaction summaries keep the mechanics and lose the reasons, and a summary of a summary loses them faster: in a real 42-compaction session on this machine the governing goal vanished after the eighth compaction and a standing rule after the third, while the transcript kept every message verbatim. /experimental-context (mirroring /kairos) puts a session in a mode where it writes <revisit key="…">…</revisit> entries in its normal messages — governing goal, standing rules, directives, decisions, open questions, live handles. Re-emitting a key supersedes it; a self-closing or retired="true" entry drops it. After every compaction and on resume the SessionStart hook injects the skill body plus the latest value per key, read from transcript_path (present on every hook payload), each stamped with its date and compactions-ago. Sidechain rows and fenced code are ignored; over a size budget only first lines are shown with a grep recipe. Same carriers as kairos: EXPERIMENTAL_CONTEXT=1 in the environment or a flag file under ~/.claude/experimental-context/<session-id> written by the UserPromptExpansion toggle. Hermetic test suite wired into the runner. Bump 7.72.9 → 7.73.0.
SSFSKIM
force-pushed
the
revisit-mode
branch
from
September 8, 2026 11:06
9272433 to
2da9338
Compare
SSFSKIM
added a commit
that referenced
this pull request
Oct 25, 2026
…its decisions The screening of board #132's 34 candidates on configuration A alone (44 runs): A answered 41 correctly. Its three failures, one run each, are two PDFs over 10 MB with no rescue found and one copyrighted spec the runner declined to quote. A reached the rest by routes around WebFetch's limits: r.jina.ai, a PDF page rasterizer, other editions of a document, parallel offsets. 10 of the 44 runs used a third-party reader or proxy. - design: "The hard set" under The evals, I4's new fields, the discoveries (WebSearch on sol through the gateway, A's routes, the 1 MB cut applying to HTML only), and two Decision Log entries (the harness and reading; how the set was screened). - report.py: a screening folder counts its extra second runs as part of its matrix, and a task's mechanism gets a column in the by-task table. - 2026-10-25-web-fetch-hard-screening.md: report.py over both screening folders. Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 25, 2026
…its decisions The screening of board #132's 34 candidates on configuration A alone (44 runs): A answered 41 correctly. Its three failures, one run each, are two PDFs over 10 MB with no rescue found and one copyrighted spec the runner declined to quote. A reached the rest by routes around WebFetch's limits: r.jina.ai, a PDF page rasterizer, other editions of a document, parallel offsets. 10 of the 44 runs used a third-party reader or proxy. - design: "The hard set" under The evals, I4's new fields, the discoveries (WebSearch on sol through the gateway, A's routes, the 1 MB cut applying to HTML only), and two Decision Log entries (the harness and reading; how the set was screened). - report.py: a screening folder counts its extra second runs as part of its matrix, and a task's mechanism gets a column in the by-task table. - 2026-10-25-web-fetch-hard-screening.md: report.py over both screening folders. Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 25, 2026
…its decisions The screening of board #132's 34 candidates on configuration A alone (44 runs): A answered 41 correctly. Its three failures, one run each, are two PDFs over 10 MB with no rescue found and one copyrighted spec the runner declined to quote. A reached the rest by routes around WebFetch's limits: r.jina.ai, a PDF page rasterizer, other editions of a document, parallel offsets. 10 of the 44 runs used a third-party reader or proxy. - design: "The hard set" under The evals, I4's new fields, the discoveries (WebSearch on sol through the gateway, A's routes, the 1 MB cut applying to HTML only), and two Decision Log entries (the harness and reading; how the set was screened). - report.py: a screening folder counts its extra second runs as part of its matrix, and a task's mechanism gets a column in the by-task table. - 2026-10-25-web-fetch-hard-screening.md: report.py over both screening folders. Sminos-Session: web-fetch-plugin#700c5e84 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 25, 2026
web evals: a hard set that shows B better (board #132)
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.
Experimental, opt-in mode mirroring
/kairos. Motivation is measured, not hypothetical: across the 25 local sessions with 3+ compactions, the longest (42 compactions over a month) lost its governing goal phrase after the 8th compaction and a standing source-of-truth rule after the 3rd, while the transcript on disk kept every message verbatim. Summaries of summaries decay; the transcript does not.How it works.
/experimental-context(orEXPERIMENTAL_CONTEXT=1) puts the session in the mode. The session writes<revisit key="…">…</revisit>entries in its normal messages: governing goal, standing rules, directives, decisions with rejected alternatives, open questions, live handles. Re-emitting a key supersedes it; a self-closing orretired="true"entry drops it. After every compaction and on resume, the SessionStart hook injects the skill body plus the latest value per key, read fromtranscript_path(verified present on every hook payload in the 2.1.263 bundle), each stamped with its date and compactions-ago so staleness is visible. Sidechain rows and fenced code are ignored; over a size budget only first lines are shown with a grep recipe.Why keys rather than a ledger file or explicit supersede links. A file needs the post-compaction agent to know which file is its ledger, and that pointer lives in the summary, which is exactly what decays. Explicit links need ids the agent no longer remembers after compaction. A key is the id and is memorable because it is the topic; the supersede chain is implicit in transcript order.
Verification. Hermetic suite
tests/claude-code/test-experimental-context-hook.sh(26 checks: env and flag carriers, body verbatim, supersession, retirement from string and block content, sidechain and fence exclusion, first-seen order, missing transcript, budget fallback, sweep, hooks.json wiring) wired into the runner; kairos suite still green; shellcheck clean on the new scripts. The hook parses the real 112 MB, 42-compaction transcript in 0.75 s. Not yet observed in a live compaction; that is the experiment.Bumps 7.72.9 → 7.73.0 so the plugin cache picks it up.