Repository navigation
fix(session-flow): stop the running-retro eval cases' permission denials - #16596
Conversation
The two running-retro eval cases read INVALID on main: 14 denials on Sonnet, 18 on Opus. Read from the kept traces, the 32 denials have four causes: - 24 are searches for the run's own transcript under the sandbox's config/projects (ls, ls -d of globs, Glob, Read of the directory), in the main agent and the analysis subagent. Retro's "Paths" builds the path from $HOME/.claude, so the first lookup finds nothing and the model hunts; the sandbox denies the whole config directory, so no case fixture or skill text can make the file readable. - 5 are Sonnet's Edit and Write of .claude/rules/build.md after it edited CLAUDE.md as the prompt asked: real skill behavior, left counted. - 2 are Grep and Glob for implement-dispatch at or above the plugin copy: the case loads no implementation plugin, so the owner the skill must evidence is not in the skill listing. - 1 is a Grep for "self-ignore" at the plugin root: step 4 named "the contract's runtime guards from the binding" with no pointer. The running retro now confirms the transcript with one Read of the resolved file, the configuration-directory override applied, never lists or globs for it, and passes "transcript: unreadable" to the subagent, which then does not look for it; the ledger is still written. A request to write a learning into CLAUDE.md, rules or memory is answered with the codify route. Step 4 links the self-ignore guard's procedure. run-validity.py sets aside a denied read aimed only at the session's own transcript file (or its subagents directory), keyed to the init line's session_id, beside the tool-results rule. Listings, globs, other sessions' files and compound calls still count. Replayed on the kept before-side results, it reclassifies none of the 32 denials. rr-skill-fit-names-owner loads an implementation stand-in, and its names-skill-and-plugin grader, which failed all 12 kept runs, now accepts the owner named in markdown: every Opus reply and 5 of 6 Sonnet replies named implementation:implement-dispatch as owner in a form the old regex could not match; the sixth said no owner was found and still fails. Refs: #16172 Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ll owner The registered eval of ce6a27f (eval-16172) read sonnet AFTER INVALID with 7 counted denials, all traced to skill text: - 6 Globs for implement-dispatch at or above the plugin copy, in rr-skill-fit-names-owner runs 1, 2, 3, 4 (two) and 6, main agent and analysis subagent. checkpoint.md told the subagent to read the owner from "the transcript's skill invocation or the repo's skill listing"; with the transcript now unreadable by design, Sonnet read "skill listing" as a disk search. The owner field now names the user's account and the skill listing in context, and forbids a filesystem search for a skill file. - 1 Bash sed of reference/structure.md, the section step 4's new pointer sends every run to (23 of 24 AFTER reads used Read or Grep). The pointer now names the Read or Grep tool. Refs: #16172 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2becb7d09e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review reviewed Security review: PR #16596 (incremental, 2becb7d → 2c1a83e)This review covers only the changes since What changed, from a security view
Prior findings: still open, on unchanged lines in a file outside this push
Other notes
critical-findings: 0 |
|
claude-review reviewed Code review (incremental, 2becb7d..2c1a83e): blocking onlyThis lane reviewed this PR at an earlier head, so this pass reports only blocking findings. It covers the five files that changed since The fix for my earlier finding works. That finding was that the bare word "own" counted as an owner label. Two things fix it:
I checked the pattern at
Skill text. The new "User's account" slot is described the same way in three places:
The changelog fragment describes the change accurately. Advisories left out under blocking-only:
Neither of these blocks the merge. Settled thread: the owner's reply on the earlier Verification: I ran no tests. The author's statements that Spend: these changes touch only eval graders and skill text, so they spend only prepaid model usage on eval runs. Nothing here can create a charge. Verifier dropped 0 of 0 candidates. |
… the user's account
The names-skill-and-plugin grader passed a line with the bare word "own"
anywhere before implementation:implement-dispatch ("on your own instead
of ..."), and failed replies that attribute both gaps to the skill
("both are in `implementation:implement-dispatch`"). A line now passes
only when an owner cue (owner, owned by, owning, belongs to) sits within
30 characters of the skill with no sentence break, or "are/is/both/all/
each in" sits right before it, or an Owner table column holds it.
When the transcript read fails, the running-retro delegation template
gains a User's account input, so the subagent gets the account its
findings rest on.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs: #16172
Summary
The two running-retro eval cases,
rr-routes-never-codifiesandrr-skill-fit-names-owner, readINVALID on main: 14 counted denials on Sonnet and 18 on Opus over 6 runs per case (the issue's
2026-11-14 measurement). Read from the kept traces of that measurement, the 32 denials have four
causes:
ls,ls -dof globs, Glob and Read of the run's own transcript under the sandbox'sconfig/projects, in the main agent and the analysis subagent$HOME/.claude. The first lookup finds nothing and the model hunts. The sandbox denies the whole config directory, so no fixture or skill text can make the file readable..claude/rules/build.mdCLAUDE.md(allowed), then the rules file (denied). Left counted.implement-dispatchat or above the plugin copycheckpoint.md, "Skill-fit gap detectors"), and the case loaded no implementation plugin.self-ignoreat the plugin rootA first eval of the fix (registration 1, below) found 7 more counted Sonnet denials, all caused by
text the fix had added. The second commit removes them, and the second eval (registration 2) reads
Sonnet AFTER VALID with 0 counted denials.
Fix
/session-flow:running-retro: resolves the session data dir with the configuration-directoryoverride applied, linking
Where transcripts are stored.
It confirms the transcript with one Read and never lists, globs or searches for it. When that Read
fails it passes
transcript: unreadableto the subagent, which then does not look for the file,and the checkpoint still writes its ledger. A request to write a learning into
CLAUDE.md, rulesor memory is answered with the codify route and leaves those files untouched. Step 4 links the
self-ignore guard's procedure.
checkpoint.mdtold the subagent to take askill-fit owner from "the transcript's skill invocation or the repo's skill listing". With the
transcript unreadable, Sonnet read "skill listing" as a filesystem search and made 6 denied Globs
for
implement-dispatch/SKILL.md. The owner now comes from the skill invocation, the user'saccount of it, or the skill listing already in context, and the text forbids searching the
filesystem for a skill or plugin file. Step 4's pointer to
reference/structure.md"Full-pathwrite procedure" now says to read it with the Read or Grep tool, after one run read it with
sedand was denied.
rr-skill-fit-names-owner: loads animplementationstand-in, so the skill the user saysthey bypassed is in the listing, the same way
rr-routes-never-codifiesloads a correctionsstand-in. No case gets wider read access.
names-skill-and-plugin: failed all 12 runs kept from the 2026-11-14 measurement. Every Opusreply and 5 of 6 Sonnet replies named
implementation:implement-dispatchas the owner, but witha bold label, backticks, an Owner table column or "belong to". The old pattern
owner:\s*implementation:implement-dispatchmatched only the subagent's internal return line,which step 5 never asks the reply to show. Samples cover each form.
After the measured head (review fixes)
names-skill-and-pluginrule: a line passes only when an owner cue (owner, owned by, owning,belongs to) sits within 30 characters of
implementation:implement-dispatchwith no sentencebreak between them, or "are/is/both/all/each in" sits right before it, or an Owner table column
holds it; a line that says
no owner foundstill fails. The measured pattern had two faults.It passed the everyday word "own" anywhere earlier on the line (review thread on
case.yaml;registration 2 BEFORE run 1 has such a line, "My own context holds only this ... invocation. I
have no record of the
/implementation:implement-dispatchattempt", though that reply alsonames the owner on a later line). And it failed the two registration 2 AFTER misses, whose
replies read "The analysis found two skill-fit gaps, and both are in
implementation:implement-dispatch" and "The checkpoint found two skill-fit gaps, both inimplementation:implement-dispatch". New samples: rewritten forms of those two lines and"owned by", "Owner of both gaps:", "The owning skill is" as passes; "on your own instead of", the
"My own context" form and "Skill change on
implementation:implement-dispatch" (a routetarget, not an owner) as fails.
in
checkpoint.mdgains a User's account input and SKILL.md step 2 says to fill it, so thesubagent receives the account its findings rest on rather than only the subjective-state note.
run-validity.pyset-aside (tests first)A denied Read, Grep, Glob or read-only Bash pipeline aimed only at the session's own transcript is
set aside as a warning, beside the existing tool-results rule. That covers
config/projects/<project>/<session_id>.jsonland its<session_id>/subagents/, with the id readfrom the trace's init line. The case cannot place that file and the sandbox denies its directory. A
listing or glob of the projects tree still counts, and so do another session's file, a write, and a
compound call with any other part. Hunting for the file is the skill behavior this change removes,
so the gate keeps counting it.
Denial counts under this gate, Sonnet, 6 runs per case:
The AFTER verdict depends on this set-aside: each of the 12 AFTER denials is the single confirming
Read of the transcript that the skill text now prescribes, one per run. Every listing, glob and
compound shell call that BEFORE made toward the transcript is gone, and the gate would still count
any of them.
Verification
test_run_validity.py: 173 tests pass, two of them new: the own-transcript reads that warn, andthe searches and nearby reads that still fail.
validate-cases.pyon the session-flow suite: 0 FAIL on the review-fix head, with node present,so every
names-skill-and-pluginsample is graded under JavaScriptRegExpas well as Pythonre. Before the pattern change the new samples gave 8 FAIL lines (the two "own" fails passing,the two "in" passes failing, each under both engines).
check-changed-skills.sh origin/main: PASS for both skills.check-affected.sh --base origin/main --no-fetch: 18 passed, 1 skipped (no changed shell).Both registrations ran 6 runs per case with auto memory off (
CLAUDE_CODE_DISABLE_AUTO_MEMORY=1onevery launch line). BEFORE is main's running-retro text and AFTER is this branch's; both sides use
this branch's cases and gate (
run-validity.py --runs 6 --scaffolded). Rules, written before eachlaunch: P, both files present with 6 runs per case and no recorded stop; V, the AFTER file reads
verdict: VALIDwith 0 counted denials (a WARN on denials allowed); N, no grader's AFTER passcount is more than 2 below BEFORE's.
Registration 1: Sonnet and Opus, AFTER =
ce6a27f6(first commit). Verdict NOT METThe 7 Sonnet AFTER denials came from skill text this branch had added: 6 Globs for another skill's
SKILL.md, prompted by the "repo's skill listing" line, and 1sedread prompted by the newstructure.mdpointer. The second commit fixes both. The helper that applied the rules had adefect: it compared the verdict line to the exact string
verdict: VALID, so it printed VNOT heldfor Opus, while the registered V accepts a VALID line with warnings. Under theregistered rules Opus is MET and Sonnet NOT MET, so the recorded verdict NOT MET stands. Nothing
was rescored. The registration 2 helper accepts the warnings form.
Registration 2: Sonnet, AFTER =
ebe9d73c(second commit). Verdict METSonnet only: under the owner's eval policy of 2026-11-16, Sonnet decides and Opus runs only to
confirm a Sonnet loss. A 2-run smoke of AFTER (1 run per case) ran first and read VALID with
warnings, so the batches continued; it is not part of the verdict.
names-skill-and-pluginat 4 of 6 is inside rule N (one pass below BEFORE). Both AFTER misses namethe owner ("both are in
implementation:implement-dispatch") in a form the measured pattern didnot accept. The registered counts above stand as recorded.
Offline application, not a rescoring. The review-fix pattern applied offline to the final reply
of each kept registration 2 run (the last
resultrecord of each trace), graded with JavaScriptRegExpand flagsmi: BEFORE 5/6, AFTER 6/6 (registered 5/6 and 4/6). The same script with themeasured pattern reproduces the registered result run for run, 5/6 and 4/6. The BEFORE miss names
the skill only as a route target ("Skill change on
implementation:implement-dispatch"), whichthe rule fails on purpose.
Eval spend, from the result files'
costUsd: registration 1, 20.21 USD (Sonnet 2.21 + 3.73, Opus6.43 + 7.84); registration 2, 6.64 USD (smoke 0.66, BEFORE 2.32, AFTER 3.65).
Main merged after the measurement
Main was merged into the branch after registration 2. The running-retro skill folder, both
rr-*cases and
run-validity.pywere identical to the measured headebe9d73cuntil the review-fixcommit, which changes the
names-skill-and-pluginpattern and samples and theunreadable-transcript input in SKILL.md step 2 and
checkpoint.md. Main changed two files the skillreads by pointer, both outside the parts it reads:
reference/structure.mdgained plugin-profilesteps under "Environment to re-establish" (the skill reads only "Full-path write procedure"), and
retro/SKILL.mdturned its context-file names into links (its "Paths" section is unchanged).Remaining
VALID result (registration 1, 0 counted) is on
ce6a27f6;ebe9d73cand the review-fix commitchanged text Opus also reads. Needed: an Opus AFTER-side validity check, 6 runs per case, auto
memory off, on this PR's final running-retro text, unless the owner rules that the 2026-11-16
policy (Sonnet decides) settles item 4.
names-skill-and-plugingrader is checked only offline andagainst its samples. Needed: a small recorded run of
rr-skill-fit-names-ownerunder thecorrected grader on the final text.
Done-when items 1, 2, 3 and 6 are delivered: the causes are named from the traces (Summary and
registration 1), the skill text and the case fixture changed with reasons (Fix), the gate sets aside
only own-transcript reads and no case gained read access (set-aside section), and the before/after
eval is above.
Related
a different denial, so it is not merged in here.
$HOME/.claudeandignores the configuration-directory override, so
/session-flow:retrolooks in the wrong placeunder it too.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MWmASMXyUAaNx5GqGM3h6c