Skip to content

fork-kit/agent-guards: the machine's agent guard hooks as a kit (#834 G4) - #847

Merged
scuttletoby merged 14 commits into
mainfrom
fork/kit-agent-guards
Nov 22, 2026
Merged

scuttletoby merged 14 commits into
mainfrom
fork/kit-agent-guards

Conversation

@scuttletoby

@scuttletoby scuttletoby commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Part of #834 (item G4, first half). The Claude Code hooks that guard every agent on a shared machine move into the
fork as one kit, fork-kit/agent-guards, laid out like fork-kit/model-guard. A project keeps only its facts
in the machine file. Agents see the same messages and the same exit codes as before, except where the lens fixes
below say otherwise.

Hooks

Hook Event (matcher), timeout Refuses Missing or failing hook
actions-disable-guard PreToolUse (Bash|Monitor), 10 s, onFailure: block Disabling a workflow, Actions itself, or branch protection or rulesets (enforcement disabled or evaluate) on any repo; refuseScripts from the machine file; a nested agent session without this machine's hooks Refuses (exit 2, and on a timeout) and says so
capacity-pipe-guard PreToolUse (Bash|Monitor), 10 s A pipe out of a capacity check, which hides its NOT OK exit Exit 1, "hook skipped, commands are NOT checked"
memory-index-guard PreToolUse (Write|Edit|MultiEdit), PostToolUse (Write|Edit|MultiEdit|Bash|Monitor), 5 s An auto-memory index over its budget (Pre: the write; Post: once per change, any tool) Exit 1 with a line
bg-guard Stop, 5 s A stop while a background Bash command still runs (at most maxBlocks per session) Exit 1 with a line
agent-slots UserPromptSubmit, Stop, 5 s Only for listed orchestrator sessions: a context line of slots and the ready queue; blocks a stop once while slots are free and items are ready Exit 1 with a line

bin/agent-guards adds four commands:

  • hooks prints the settings entries;
  • self-check checks the whole machine file section strictly, the hook files and their /usr/local/bin links, the
    drop-in, an open approval, and warns when the agents' user can become root without a password;
  • check [--settings F] runs every wired command the way Claude Code does (Bash and Monitor cases), with one case
    it must refuse and one it must pass, under a temporary HOME, and changes nothing on the machine. As root it
    reads F only when it is root-owned and not writable by others;
  • approve [--hours N] [--cwd DIR] --command '<cmd>' | --revoke (root only): the owner's approval of one command,
    below.

sbin/agent-guards-install is on the shared kit_install.py. The shared bootstrap accepts it with
--kit agent-guards [--settings | --no-settings]. --settings writes a managed settings drop-in,
/etc/claude-code/managed-settings.d/agent-guards.json. It is written after the hook links and never written over
a drop-in of that name the installer did not write. The rollback is --no-settings (keeps the hook files).

Config keys (machine file, "agent-guards" section; all optional, defaults = the old values)

Key Default
actionsDisable.stateDir ~/.local/state/actions-disable-guard
actionsDisable.refuseScripts [] ({"name", "flag", "why"})
capacityPipe.commands ["t3-capacity"]
memoryIndex.maxChars / maxLine / stateDir 6000 / 160 / ~/.cache/memory-index-guard
bgGuard.skipSessionsFiles / maxBlocks / stateDir [] / 3 / ~/.local/state/bg-guard
agentSlots.sessionsFile / queue / readyHeading / maxAlive / processName / note "" (off) / "" / "## Ready" / 10 / "claude" / ""

The machine file must be owned by root and not writable by others; otherwise it is not used. Each hook reads only
its own part: a bad key keeps its default, an unknown key is ignored, a bad refuseScripts row is dropped and the
good rows kept. The hook tells the agent (a systemMessage, plus context for PreToolUse) and stderr. Another hook's
part, or an unknown top-level key (a later G4b section), changes nothing for it. self-check names every problem.

Lens round 1 fixes

Approval: a root-owned file, not an environment variable (lens B major). Options were (a) refuse any command
that names or sets the variable, or (b) a root-owned approval file. (a) cannot work: the variable is set when the
owner starts a session, so every nested claude -p or codex exec inherits it without any command naming it. (b)
is the root fix: sudo agent-guards approve --hours N writes /etc/fork-kit/agent-guards-approval.json (root-owned,
0644, atomic) with only the SHA-256 of a random code and an end time (at most 24 h), and prints the code. (Round 2
binds it to one command, one folder and one use: see below.)
The command carries #owner-approved:actions-disable:<code>. An agent cannot write the file and cannot guess the code;
a nested session gets nothing it did not already have. The file is read under the machine file's rules (owner,
mode, no links); anything wrong is no approval. The old variable is not read any more. Who can become root without
a password (sudo NOPASSWD, the docker group) can still write it: self-check warns about both and the README says so.

Nested sessions (lens B minor). Managed hooks run in a nested claude -p even with disableAllHooks in a user or
--settings file, so those pass. claude --bare / --safe-mode / CLAUDE_CODE_SIMPLE and codex (except login,
logout, help, completion, version) run no managed hooks, so starting one is refused (the owner's approval opens it). Round 2 widens this and says what
it is not: see below.

Finding Fix
B major: Monitor bypasses actions-disable-guard Matcher Bash|Monitor; the guard reads Monitor events; check has a Monitor case and reports a Bash-only wiring as MISSING
B major: approval variable inherited by nested sessions Root-owned approval file + code (above; bound to one command in round 2)
B minor: memory-index PostToolUse misses Monitor Matcher Write|Edit|MultiEdit|Bash|Monitor
B minor: a timeout fails open onFailure: block on the closed hook; a missing or empty hook file refuses too
B minor: nested --bare, CLAUDE_CODE_SIMPLE, codex exec Refused (above)
B minor: check --settings as root Reads the file only when root-owned, not group/other-writable, no link
B minor: ruleset enforcement=evaluate Refused like disabled (fields, JSON body, GraphQL)
B minor: sudo NOPASSWD / docker group self-check warning + README
A+B minor: uninstall removes hooks a foreign settings file names; rollback Uninstall refuses while a settings file the kit did not write names a hook, then removes the drop-in, then refuses while a session started before that still runs; rollback documented as --no-settings
A major: an unknown sibling key drops the whole machine file Each hook reads only its own part; strict check in self-check
A major: one bad refuseScripts row drops all Bad rows dropped one by one, named
A minor: fallback not visible to the agent systemMessage (and PreToolUse context) on stdout as well as stderr
B nit: vp check Formatted
B nit: self-check checks the version folder, not the links Links checked
A+B nit: ensure_dir chmods an existing /etc/claude-code Only missing managed folders are made; a group/other-writable one is refused
B nit: wiring.ours is loose Anchored to the kit's own command form
A nit: check writes the real log and cache Hooks run with a temporary HOME
A nit: an empty guard file exits 0 Refuses ([ -s ])

Not fixed (nits):

  • The default capacity command name t3-capacity is one machine's name. It is the old value the hooks had; a
    machine sets its own in capacityPipe.commands. Changing the default would silently turn the guard off where it
    runs today.
  • The old (pre-kit) bg-guard has no lock in the short window while both copies are wired during the switch; the
    README says to remove the old entries soon after. Worst case is one extra block.
  • Old state "an older kit's files": no earlier release of this kit exists, so there is no older layout to migrate.

Lens round 2 fixes

One commit per finding; each new test is named after its finding (test_r2_<finding>_...) and fails on the
round-2 head 6d5047d (19 of 19: run there with the new test files copied in).

Finding Fix Commit Tests
B major 2: the code is not one-time; any command can use it until it ends sudo agent-guards approve --command '<cmd>' [--cwd DIR] keeps the SHA-256 of the normalised command (marker off, runs of blanks as one) and the real folder next to the code's hash (approval file version 2). The guard passes only that command, in that folder, once: the first run records the use (approval-used-<hash> in the guard's state folder, written as a temp file then linked, so two runs at once cannot both win); a second run, or any other command with the code, is refused. A code seen in a transcript, the app's database or ps opens nothing else. README, docstring and this body no longer say "one-time code" for the old behaviour 239c710 test_r2_major2_* (6 in actions-disable, 1 in wiring)
B major 1: hookless nested sessions by other forms (a) Wider detection: claude and codex by their real program path (.../claude/versions/<v>, the @anthropic-ai/claude-code and @openai/codex packages), a link to or a copy of the installed program, npx / bunx / pnpm dlx / npm exec / bun x / node <cli>, $(which claude), a name the same command gives one (ln -s), and inside python -c, node -e, perl -e, at, systemd-run (the same token layer as for gh). CLAUDE_CODE_SIMPLE in the command, through env -S, in a sourced file, in BASH_ENV / --rcfile, and in the user's shell start files. (b) The threat model below, in the README ("What the guards are and are not") and the guard's docstring d249b38 test_r2_major1_* (4)
B minor 1: GraphQL ruleset update with EVALUATE in a variable The variable values (-F, -f, --raw-field, --field=, i[enforcement], a JSON --input file) are read like the REST fields, so EVALUATE is refused like DISABLED 280d289 test_r2_minor1_*
B minor 2 + A minors 1 and 2: uninstall's running-session check Sessions are found by the real path of their program (/proc/<pid>/exe, the script node runs, an installed claude), not the name. The uninstall's own parent session is no longer skipped: run from inside a session that has the hooks, it refuses ("run uninstall from a terminal"). A refusal for a hand-wired entry is remembered (/etc/agent-guards/hand-wired-seen.json, removed with /etc/agent-guards), so the next run still counts every session older than itself; so does a run where the drop-in was never on. The project .claude/settings*.json of each running session's folder (and the folders above) is searched too 2dffcfc, a90b854 (boot time read only when a session runs; found by the shared kit_install tests) test_r2_minorB2_*, test_r2_minorA1_*, test_r2_minorA2_* (3), test_r2_state_*
A nit: codex arguments Read option by option: codex -m o3 exec x is refused as codex exec; codex mcp list passes (MCP setup, no session); npx -y @openai/codex exec x is refused; codex mcp-server stays refused 325132b test_r2_nit_codex_*
B nit 1: which Claude Code honours onFailure README: 2.1.295 and later; older ones ignore it and let a failed or timed-out hook's call run aec5b9f (docs)
B nit 2: --safe-mode refusal Kept: safe mode runs managed hooks, but not hooks wired by hand in user settings (the README's agent-guards hooks route). The reason is in the README and docstring d249b38 in test_r2_major1_*
A nit: the machine-file note repeats Kept loud on purpose; README says it shows on every call each hook with a problem handles (so one Bash call can show it once per hook) aec5b9f (docs)

Also: origin/main merged twice (seam check fork-seam-check.cjs --config-ref origin/main origin/main HEAD = 0).

What the guards are and are not (threat model)

The guards stop mistakes and casual misuse by an agent: a command typed from habit, a step copied from an old
note, a short cut it was told not to take. Each refusal says why. They are not a security boundary against a
hostile agent
: they read shell text before it runs, and text can be built so that no reader sees what it does
until it runs (words made at run time, a program the guard does not know, an MCP tool that starts a session, a file
read by a file the command sources).

The real boundary is the GitHub permissions of the token the agent holds. Recommended setup: agents get a
fine-grained token for their repos without Actions (write) and Administration (write), so turning off a workflow,
Actions or a ruleset fails at GitHub whatever command asks for it; the token that can do that stays with the owner.
The guards then catch the mistake earlier, with a reason, and the token holds when they miss one.

Not covered (known, by design of a text check): other agent programs; an MCP tool or app that starts a session
(another provider's child, for example); command words built at run time with no claude / codex in the text;
files read in turn by a sourced or start file; a copy of the Claude Code program under another name in a folder
uninstall does not know (uninstall matches the program's real path, the package path and installed claude
links, not file contents). The approval's use record is in the agents' user's state folder: an agent that sets out
to can delete it, and can then only repeat the one approved command, in the approved folder, until the end time.

Unfixed nits: the machine-file note is not merged across hooks within one call (each hook is its own process;
merging needs shared per-call state, not worth it for a note meant to be fixed quickly).

Round 2 state question

  • Runs again: approve twice: the second replaces the first (the first code stops working). The approved
    command run twice: the second run is refused ("used already"); a second hook run for the same tool call passes.
    Uninstall again after any refusal: the drop-in stays gone, the hand-wired record stays, the session check runs again.
  • Stops half-way: approve killed: a stray temp file at worst, never a half approval file (temp, fsync, rename).
    The guard killed while recording a use: no use record and no half file (temp then link), so the approval is still
    unused, never half used. Uninstall killed after writing the hand-wired record: the next run counts more sessions
    as older, never fewer.
  • Old or empty state: an approval file of the round-1 format (version 1, no command) is no approval; a broken
    or empty hand-wired record counts as seen now; no machine file gives the defaults.

Round 2 test run (this head, each file through heavy after t3-capacity 1536 said OK)

actions-disable 115, agent-slots 6, bg-guard 9, capacity-pipe 22, config 15, install 20, memory-index 14, wiring
21, common/free_contract 17, common/kit_install 127, common/machine_file 27: all OK.

Tests (state question included)

New and changed tests are failing-first against the head before this round. They cover:

  • refuse and pass cases per hook, for Bash and Monitor;
  • the approval: a valid code, no code, another code, a longer or shorter code, the old variable and marker, revoked,
    over, a group-writable file, a link, broken JSON, more than 24 h;
  • nested sessions: claude -p, claude --bare, disableAllHooks, CLAUDE_CODE_SIMPLE, codex exec, and
    mentions that only name them;
  • a machine file that is missing, empty, garbled, of another version, group-writable, with an unknown sibling key or
    a G4b section, a broken key of another hook, a bad refuseScripts row;
  • a timeout (onFailure), an empty or missing guard file;
  • install run twice, stopped at every step, then run again; uninstall with a foreign settings file, with an older
    session running, stopped after the drop-in is gone; the rollback; a managed folder others can write;
  • check --settings as root with a group-writable file and a link; check leaves the real HOME untouched.

General vs project

General (this PR): all hook code, the settings entries, the installer, the approval, the checks and the tests.
Nothing in it names a project, a person or a machine path.

Project or machine (not in this PR): the facts in the machine file section. These are the capacity command's
name, the memory budget, the orchestrator's sessions file and queue, and a project script that must not run with a
given flag. A project's own copies of these hooks are deleted in a follow-up on that project's side, after the
machine switches to the kit. This kit's agent-slots is unrelated to the T3 app's own agentSlots setting.

Not in this PR (G4b): new hooks for further rules (no CI-skip marker in commit messages, no git stash in
worktrees, no bare CLI against a live database).

🤖 Generated with Claude Code

…G4)

Five Claude Code hooks that guard every agent on a shared machine, as one kit with one
installer, facts from the machine file and the same messages and exit codes as before:

- actions-disable-guard (PreToolUse Bash): no disabling of workflows, Actions or branch
  protection; fails closed (a missing or failing hook refuses, and says so)
- capacity-pipe-guard (PreToolUse Bash|Monitor): no pipe out of a capacity check
- memory-index-guard (Pre/PostToolUse): the auto-memory index stays inside its budget
- bg-guard (Stop): no stop while a background Bash command still runs
- agent-slots (UserPromptSubmit, Stop): slot and ready-queue context for orchestrators

The others fail open with a visible line. `agent-guards check` runs each wired command
with a case it must refuse and one it must pass; `--settings` writes a managed settings
drop-in. Shared bootstrap and kit_install contract tests cover the new kit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scuttletoby

Copy link
Copy Markdown
Owner Author

lens: B · reviewer: lens agent (security boundary and fail-safe) · read at: f64f2c7
verdict: not safe to merge
covered: all of fork-kit/agent-guards (bin, lib, sbin, README), the bootstrap and machine.example.json changes, and a line-by-line diff of each hook against the copies the machine runs today (the hook logic is the same; only the config source, the shebang, the refuseScripts rule and doc text changed). Also the private swap plan (order, rollback, half-done states).
checks: fed about 95 hand-written PreToolUse events straight into bin/actions-disable-guard (HOME in a scratch folder, nothing wired): -X/--method/-XPUT/--method=PUT, POST to /disable, query strings, a full URL, //, a trailing /, %2F, upper case, --field, --input file and heredoc, a method-override header, GraphQL delete/update mutations, -F query=@file, -R before and after the subcommand, eval, bash -c, variables, $(..), $'\x64..', split quotes, a backslash, alias, env/command/sudo/timeout/nohup/setsid/stdbuf/watch/parallel, find -exec, xargs (also from gh workflow list), a script written then run, at -f, make -f /dev/stdin, tmux, script -c, a git -c alias.x='!..', python -c. All refused. What passes is listed below. The PR's tests were not run here: t3-capacity 1536 said NOT OK on every try (load), so I relied on CI on this same head, where Fork kit tests 1, 2 and 3 pass. Lint (vp check) is red with "Formatting issues found".
state: runs again: the installer rewrites nothing when the text and mode are the same, and the drop-in is written after the links, so a second run, or a run after a stop at any step, ends in the same state. Stopped half-way: a temp file and a rename (with fsync) for the drop-in and the config file, so there is never a half-written drop-in. The saved settings choice means a stop after config and a later bare run still writes the drop-in. Old or empty state: a missing, empty, garbled, foreign-owned or group-writable machine file, or a broken section, gives the built-in defaults plus one stderr line. The guards never become weaker than the defaults. The one exception: refuseScripts defaults to [], so a broken section drops that extra rule (documented). Running sessions: Claude Code keeps the hooks it loaded at start, so uninstalling while sessions that loaded the drop-in are alive makes every Bash call in them refused (see minor 1). The swap plan's order (install, then check, then wire both, then prove with a fresh claude -p, then remove the old entries) never leaves a session unguarded. Its rollback (restore the user entries first, then remove the drop-in) is right. Use --no-settings for that, not uninstall.
blocker: none
major: 1. The Monitor tool runs shell commands with no actions-disable check (fork-kit/agent-guards/lib/agent_guards/wiring.py:180, bin/actions-disable-guard:3166). The matcher is Bash only, and the guard itself returns 0 for any tool_name that is not Bash. A Monitor call with gh workflow disable 1 -R o/r, or gh api -X PUT repos/o/r/actions/permissions -F enabled=false, passes. I fed it directly: pass for Monitor, REFUSE for the same text as Bash. Monitor poll loops that call gh are a normal agent pattern, and capacity-pipe-guard already covers Bash|Monitor, so this gap is easy to fall into. Fix: matcher Bash|Monitor for actions-disable-guard, read tool_input.command for both tools in answer(), and add a test plus a check case for a Monitor event.
major: 2. The owner escape hatch opens from inside a session through a nested session (bin/actions-disable-guard:3071-3085, docstring lines 116-120). The docstring says "a command prefix or export in the Bash tool never reaches this hook". That is true for this session's own hook, but not for a claude -p the command starts: the nested session inherits the variable, and its hooks read it. CLAUDE_GUARD_OWNER_ALLOW_ACTIONS_DISABLE=$(date -u +%F) claude -p "$(cat p.txt)", with #owner-approved:actions-disable and the disable call in p.txt, passes the outer guard. The nested guard then lets the call through. The refusal text itself tells the agent the variable and the marker. Fix (text level, cheap): refuse any Bash/Monitor command whose text names the variable (MARK_ENV) in any form: assignment, export, env VAR=, or a file it writes. Better: take the approval from a root-owned place (a dated line in the machine file, or a root-owned file) instead of the environment.
minor: 1. uninstall (and the swap plan's rollback "or uninstall") removes /usr/local/bin/actions-disable-guard while running sessions still call it from the hooks they loaded. Each of those sessions then refuses every Bash call until it restarts. in_use() does not see this, because no hook process is running at that moment (sbin/agent-guards-install:104-113). Fix: README and the plan say "roll back with --no-settings; uninstall only after every session started with the drop-in has ended". Or keep the hook links for one more release after the drop-in goes.
minor: 2. Root ownership is the whole boundary for the drop-in and the machine file (README "only root can change it", the PR body "agents can no longer change a guard's facts"). Where the user the agents run as can become root without a password (sudo NOPASSWD, membership of the docker group), that boundary does not exist. self-check could warn when sudo -n true succeeds, or when the user is in docker. A text rule could also refuse Bash/Write/Edit that target /etc/claude-code, /etc/fork-kit or /usr/local/bin/. Today neither is done, and the README states the boundary without that condition.
minor: 3. Nested sessions and other agents are outside every hook here. claude --bare -p "$(cat p.txt)", claude -p --settings '{"disableAllHooks":true}' .. and codex exec "$(cat p.txt)" all pass actions-disable-guard (a prompt from a file is unread text). Whether bare mode or a user/--settings disableAllHooks also turns off MANAGED hooks is not tested by the PR or by the swap plan. The Claude Code binary has separate messages for "hooks off (bare mode)" and "switched off in your user settings or --settings file". Agents of other providers do not read Claude Code settings at all. Fix: in the swap plan's step 3/5 proofs, also run the bad case under --bare and under --settings '{"disableAllHooks":true}', and record the answer. If managed hooks fall, set the managed key that holds them, or add a text rule against those flags. The README's "every agent on a machine" should say "every Claude Code session".
minor: 4. A hook that hangs past its timeout lets the call through, also for the fail-closed hook (README line 38). actions-disable-guard limits itself to 5 s from its process start, but a process that is not scheduled for 10 s on a machine under heavy load gets ended by Claude Code, and the command runs unchecked. If Claude Code's hook entries accept a failure mode (the README names onFailure), set it to refuse for actions-disable-guard. If not, say plainly that a timeout fails open.
minor: 5. memory-index-guard's PostToolUse matcher (Write|Edit|MultiEdit|Bash, wiring.py:182) leaves out Monitor, so a Monitor command that rewrites MEMORY.md is not checked afterwards. Add Monitor, as for capacity-pipe-guard.
minor: 6. agent-guards check --settings F runs every command in F through /bin/sh -c as the caller (lib/agent_guards/check.py:144-155). Run as root on a user's settings file (the README shows --settings ~/.claude/settings.json), that runs commands the user (or an agent) wrote, as root. Fix: as root, refuse an F that is not root-owned and not writable by others.
minor: 7. Some ruleset and protection writes still pass: gh api -X PATCH orgs/o/rulesets/5 -f enforcement=evaluate (evaluate is also "not enforced"), -F rules[]= (rules emptied), -X DELETE repos/o/r/environments/<env>/deployment-branch-policies/<id>, and the GraphQL updateBranchProtectionRule with checks off. Most of this is the documented owner decision ("other changes to protection with PUT/PATCH/POST pass"). enforcement=evaluate is the one that is the same act as the refused enforcement=disabled: add it to RULESET_OFF.
nit: 1. CI Lint (vp check) is red on this head: "Formatting issues found" (probably the new README tables or machine.example.json).
nit: 2. agent-guards self-check checks the hook files in its own version folder (bin/agent-guards:63), not the /usr/local/bin links that the drop-in names. A missing link shows only in agent-guards-install self-check.
nit: 3. ensure_dir chmods an existing /etc/claude-code and managed-settings.d to 0755 (common/kit_install.py:190). That changes a folder another tool may own. wiring.ours takes any drop-in as the kit's when every command contains /<hook name>.

@scuttletoby

Copy link
Copy Markdown
Owner Author

lens: code · reviewer: lens agent (A: correctness and parity) · read at: f64f2c7
verdict: not safe to merge
covered: each of the five bin/ hooks, diffed line by line against the host copies it replaces (the ones wired in both accounts' settings today); lib/agent_guards (config, wiring, check), bin/agent-guards, sbin/agent-guards-install, the bootstrap and kit_install contract changes, machine.example.json, README, all 8 test files
checks: ran every test file of the PR and the shared kit_install contract (actions-disable 98, agent-slots 6, bg-guard 9, capacity-pipe 22, config 11, install 9, memory-index 14, wiring 12, kit_install 127: all OK). Parity is by diff, not by running old against new: the command-reading code of actions-disable-guard and capacity-pipe-guard is unchanged. The only decision changes are the refuseScripts loop (same match as the old fork_garden rule; the fast-exit key it builds gives the same "forkgarden" word), the configurable check names, and the stateDir paths. So quoting, && ; | chains, subshells, env prefixes, heredocs, Monitor input and multi-line commands get the same refuse or pass answer. The refusal texts are unchanged except the documented run_tests.py hint. Refusals still go out as a JSON deny with exit 0, so the new || exit 2 wrapper never adds a second message to a normal refusal. Also checked in the installed Claude Code that managed-settings.d reads only non-dot .json files, so a temp file left by a killed write is never loaded.
state: runs again: the installer finds the same drop-in and changes nothing (write_file compares first); old and new hooks wired at once give 2 bg-guard counts per stop, a doubled context line and a doubled memory refusal (as the swap plan says); the old bg-guard writes the count file without the lock (see nit). Stops half-way: the drop-in is written by temp file + rename after the links, and the tests stop at every step, then run again. Old or empty state: no machine file or no section gives the kit defaults with no stderr. A broken section gives the defaults plus one stderr line that agents never see (exit 0). But a section that is fine for its own hook and only has a key this release does not know drops every hook's settings (major below). Uninstall can leave a fail-closed entry pointing at a removed file (minor below).
blocker: none
major: fork-kit/agent-guards/lib/agent_guards/config.py:114 checks the whole "agent-guards" section against this release's five hook names before it reads one hook's own keys, and machine_file.fields refuses unknown keys. So one key this release does not know drops ALL five hooks to their defaults. That key can be a new hook's subsection written ahead of the kit upgrade (the swap plan's own order is machine file first, then install), the same file left in place after a kit rollback, or a typo. Failure scenario: G4b adds "commitMarker": {...} to /etc/fork-kit/machine.json before the new kit is installed. Then actions-disable-guard has no refuseScripts, so python3 ./fork_garden.py --fix runs. bg-guard loses skipSessionsFiles, so orchestrators get stop-blocked. agent-slots goes silent. Each hook only writes a stderr line on exit 0, which agents never see. A bad entry inside one hook's subsection does the same to that hook's other keys: one bad refuseScripts row drops all rows. Fix: in load(hook), read only section.get(hook) with fields() and skip the sibling check. Report unknown sibling keys in agent-guards self-check only. Add a test: a section with an unknown sibling key still gives actionsDisable its refuseScripts.
minor: sbin/agent-guards-install:104-113 (with kit_install _remove): uninstall removes /usr/local/bin/actions-disable-guard even when a settings file the kit did not write still names it. Examples: a hand-edited drop-in (ours() is then False, so it is kept), another managed drop-in, or a user settings entry pasted from agent-guards hooks, which the README offers. That entry fails closed, so every Bash call of every new session is refused until root removes it. Fix: before removing the links, refuse the uninstall (or keep the links) when any file in /etc/claude-code/managed-settings.json or managed-settings.d/
.json other than an ours() drop-in names a kit hook path. Say in the README that hand-wired entries must go first.
minor: the fallbacks do not give today's live values, as the brief asked. With a missing or broken file the kit defaults apply: refuseScripts [], skipSessionsFiles [], agentSlots off. The README says so for refuseScripts (line 48), so this is a documentation and visibility gap, not a parity bug. Suggest that agent-guards self-check (or the daily report) flags a section problem loudly, because a hook only writes it to stderr on exit 0, which agents never see.
nit: lib/agent_guards/check.py:92: agent-guards check says it "changes nothing on the machine", but its refuse case for actions-disable-guard appends a line to the real user's /log, and the cache file is updated. Say so, or point stateDir at the temp folder for the check run.
nit: sbin/agent-guards-install:90-91: ensure_dir chmods an existing /etc/claude-code (and managed-settings.d) to 0755, even when an admin set another mode. Only create the folder when it is missing; leave an existing folder's mode alone.
nit: lib/agent_guards/config.py:80: the default capacity check name t3-capacity is one machine's tool name inside the public kit. It is harmless (it only matches that word), but a neutral default (none, so the hook does nothing until configured) would fit "facts in the machine file" better.
nit: wiring.py:47 with wiring.test.py:106: an empty actions-disable-guard file exits 0 and passes every command. The old hook behaved the same, and the kit's manifest check makes this unlikely, but the test pins it as wanted. Consider failing closed when the hook prints no answer and its file is empty.
nit: during the swap plan's both-wired window, the old ~/.local/bin/bg-guard truncates and rewrites the same count file without the flock. The new one can then read an empty file as 0, so maxBlocks can be passed during that window. Keep the window short, as the plan says. No code change needed in the PR.

scuttletoby and others added 3 commits November 22, 2026 03:03
- actions-disable-guard and capacity-pipe-guard match Bash|Monitor; the
  memory-index after-call check matches Monitor too; check reports a
  guard wired for Bash only as missing.
- The owner's approval is a root-owned file with the hash of a one-time
  code (agent-guards approve); the session variable is no longer read,
  since nested sessions inherited it.
- Refuse starting a nested session without this machine's hooks
  (claude --bare/--safe-mode, CLAUDE_CODE_SIMPLE, codex).
- The closed hook sets onFailure block; an empty guard file refuses.
- A ruleset set to evaluate is refused like disabled.
- Each hook reads only its own part of the machine file section; bad
  keys and refuseScripts rows are dropped one by one and named to the
  agent; self-check does the strict check.
- Uninstall refuses while a foreign settings file names a hook or an
  older session runs; rollback is --no-settings.
- check --settings as root reads only a root-owned file; check runs
  hooks under a temporary HOME; self-check checks links, an open
  approval and passwordless ways to root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scuttletoby

Copy link
Copy Markdown
Owner Author

lens: code r2 · reviewer: lens agent (A: correctness and parity) · read at: 6d5047d
verdict: safe to merge
covered: the fix commit 268c218 since my round-1 head f64f2c7 (all of fork-kit/agent-guards: the five hooks, lib/agent_guards config, wiring, check and the new approval.py, bin/agent-guards, sbin/agent-guards-install, README, the tests). From the merge of main, only .github/fork-ci-tests.txt: the kit's 8 test lines are back in the new format (each ends in unittest, ~45s and ~20s kept), and the kit has no other test file. Parity: the five hook copies the machine runs today, and the hook entries in both accounts' settings files.
checks: ran all 8 kit test files and the shared kit_install test on this head through heavy: actions-disable 103, agent-slots 6, bg-guard 9, capacity-pipe 22, config 15, install 14, memory-index 14, wiring 20, kit_install 127, all OK. Failing-first: the same test files on the round-1 code fail 26+4 in actions-disable, 9+15 in config, 10+1 in install and 6+20 in wiring. That covers each round-1 finding: unknown sibling key, bad refuseScripts row, the fallback named to the agent, foreign settings at uninstall, the empty guard file, the managed folder others can write, and check under a temporary HOME. Claude Code 2.1.325's own hook schema has onFailure on each command hook, next to timeout and statusMessage. A timeout there counts as a block ("timed out; blocking because onFailure is block"), so the kit's entry is in the right place. Fed about 25 extra commands to the hook as Bash and as Monitor (nested agents, mentions, codex subcommands, the approval marker with no file). Results are in the nits.
state: runs again: install twice changes nothing. --no-settings twice: the second run finds no drop-in, and settingsOff stays the time of the first. Uninstall after a refused uninstall: the drop-in is already gone, so only the session and foreign checks run again. Stops half-way: settingsOff is written as "pending" before the drop-in is unlinked and becomes the time afterwards. A stop in between leaves "pending", and the next run writes its own (later) time. A later time counts more sessions as older, never fewer. The tests stop the install at every step. Old or empty state: with no machine file, every hook gets its defaults without a notice. A broken part of one hook changes only that hook, and only the bad key or row, and the hook names it to the agent. A key no hook knows is silent for the hooks and named by self-check. That makes the swap order "machine file first, then kit" safe for a later G4b section. Old settings: the host still wires ~/.local/bin copies, which the kit neither reads nor removes. Sessions started before uninstall: covered for the drop-in, but not for two cases (minors 1 and 2).
blocker: none
major: none
minor: 1. fork-kit/agent-guards/sbin/agent-guards-install:186-197: older_sessions leaves out the uninstall's own ancestors. A claude ancestor that would otherwise be listed started before the drop-in was removed, so it is exactly the kind of session that loses its hooks. A newer one is not listed anyway. Failure scenario: the owner runs sudo agent-guards-install uninstall from the Bash tool of a session that loaded the drop-in. The uninstall passes and removes the links, and that session then refuses every Bash and Monitor call until it restarts. Fix: keep claude processes out of mine (or refuse with "run uninstall from a terminal, not from a session that has the hooks"), and add a test with the fake claude as the parent.
minor: 2. fork-kit/agent-guards/sbin/agent-guards-install:216-232: the older-session check runs only against settingsOff, the time the kit's drop-in went. Hand-wired entries get no such check. The README offers them through agent-guards hooks. Failure scenario: a user's settings file names /usr/local/bin/actions-disable-guard. Uninstall refuses and says to remove the entries by hand and run again. The owner does that, and no drop-in was ever written, so settingsOff is unset. The second uninstall removes the links, and every session that started with the hand entries refuses every Bash call. foreign_settings also does not look at a project's own .claude/settings*.json. Fix: when foreign entries were seen, or settingsOff is unset, refuse while any claude process older than this uninstall runs (or record the time of the last foreign-entry refusal and compare against that). Add one line to the README.
nit: actions-disable-guard:2660: the codex subcommand is the first word that does not start with "-", so a flag's value is taken as the subcommand. codex -m o3 exec x is refused as "codex o3" (still refused, but the text is wrong). codex mcp list (configuration, not a session) is refused. npx -y @openai/codex exec x passes. The PR body's "not covered: other agent programs" may be meant to include that last one; if so, name the npx and bunx form there.
nit: README:55 and the PR body say "one-time code", but approval.approved accepts the code for any number of commands until its end time. approve prints this correctly ("Every command carrying it passes ... until then"). Say "a code for N hours".
nit: with one hook's part broken, the same notice goes into every tool call's context, once per hook that has a problem. A Bash call can carry it up to three times (actions-disable Pre, capacity-pipe Pre, memory-index Post). It is loud on purpose; note it in the README so the owner fixes the file quickly.
nit: round 1, fixed: the unknown-sibling-key major (config.py _own/load read only the hook's own part, key by key), the bad refuseScripts row (dropped one by one and named), the silent fallback (config.notice: systemMessage, plus additionalContext where the event takes it), uninstall with a foreign settings file, check writing the real HOME, ensure_dir changing an existing folder, and the empty guard file (now [ -s ]). The t3-capacity default nit no longer applies, because main now ships fork-kit/heavy/bin/t3-capacity, so the name is the fork's own tool. Parity: the host copies are the same files as in round 1. The kit differs from them only where the PR body says. These changes are the Monitor matcher (host: Bash only), onFailure: block (host: a timeout lets the call run), an empty file refuses (host: python3 -I of an empty file exits 0 and passes; a missing file exits 2 and refuses, as the kit does), PostToolUse with Monitor, ruleset evaluate, nested agents and the approval file. Ruleset bodies are also now read without the cue words (canon(cue=False)), which is needed for "enforcement": "evaluate". It can only add refusals, and a "disabled" body file is refused on both heads. Nothing personal or project-specific is in the kit.

@scuttletoby

Copy link
Copy Markdown
Owner Author

lens: B r2 · reviewer: lens agent (security boundary and fail-safe) · read at: 6d5047d
verdict: not safe to merge
covered: the fix commit 268c218 since my round-1 head f64f2c7 (main merges ignored): bin/actions-disable-guard, lib/agent_guards/approval.py, bin/agent-guards (approve, self-check, check --settings), check.py, wiring.py, config.py, sbin/agent-guards-install (settings_off, uninstall_guard, older_sessions), README, the tests. Also the Claude Code 2.1.325 binary's own text for onFailure, bare mode, safe mode and disableAllHooks.
checks: ran every agent-guards test and the fork-kit/common tests at this head through heavy: all 11 files OK. Fed about 130 PreToolUse events straight into bin/actions-disable-guard (scratch HOME, nothing wired). Refused, as they should be: Monitor gh workflow disable and a Monitor poll loop with PUT .../actions/permissions; claude --bare in any flag position, --bare=, quoted or split --ba""re, $x, $c, alias, bash -c, sh -c, eval, a script written then run, xargs, find -exec, timeout, nohup, sudo, tmux, script -c, a pipe into it; CLAUDE_CODE_SIMPLE=1 claude, env/env -i/export forms; codex exec, codex e, codex resume, codex mcp-server, a full codex path; enforcement=evaluate by -f/-F/--raw-field/--field=, upper case, split quotes, $'\x65', %65, --input file, here-string, heredoc split over lines, curl -d/--data-raw/--json/-d @file, GraphQL inline EVALUATE and -F query=@file; the old variable plus the old marker; a made-up code. Passed, as they should: claude -p, codex login, codex --version, mentions in echo/grep/commit messages, enforcement=active, POST of a new ruleset. Read the binary: onFailure is a per-hook key of command hooks (the kit puts it there), and bare mode / CLAUDE_CODE_SIMPLE drop "settings-file, flag, policy, and plugin hooks", while a user or --settings disableAllHooks alone does not stop managed hooks (both checks need the policy value), so claude -p and disableAllHooks are still guarded.
state: runs again: approve writes a new code each time and replaces the file whole (temp file, fsync, rename), so the last code wins and older codes stop working; --revoke twice says "there was no approval". install twice ends the same. uninstall again after a refusal: the drop-in is already gone, settingsOff holds the time, and the older-session check runs again. Stopped half-way: approve leaves at worst a stray .agent-guards-approval.* temp file and no approval (fails closed); a stop between "pending" and the drop-in removal leaves "pending", and the next run takes a later time (counts more sessions as older, never fewer). Old or empty state: no approval file, a link, wrong owner or mode, bad JSON, another version, a time over or a file without until are all "no approval"; a clock that moves back makes an open approval last longer (only root can move it). The old CLAUDE_GUARD_OWNER_ALLOW_ACTIONS_DISABLE variable is not read anywhere outside the tests.
round 1, fixed: Monitor now reaches actions-disable-guard (matcher Bash|Monitor, TOOLS, and check reports a Bash-only wiring as MISSING).
round 1, fixed: the session variable is gone; an agent cannot write, forge or extend the root-owned approval file, and a nested session gets no approval it was not handed.
round 1, fixed: memory-index PostToolUse covers Monitor; onFailure: "block" on the closed hook; an empty or missing guard file refuses; check --settings as root reads only a root-owned file root alone can write; uninstall refuses while a foreign settings file names a hook, removes the drop-in first, then refuses while an older session runs; sudo NOPASSWD and docker group warned in self-check; ensure_dir no longer chmods existing folders; wiring.ours anchored.
blocker: none
major: 1. A nested session without this machine's hooks still starts by many one-line forms, so the closed guard can be walked around in two steps (start a hookless session, run gh workflow disable there). nested_agent (fork-kit/agent-guards/bin/actions-disable-guard:2647-2663) only matches the command word's basename claude or codex, and CLAUDE_CODE_SIMPLE only as literal text of this same command. All of these pass: the installed binary by its real path (~/.local/share/claude/versions/<version> --bare -p x, which is where ~/.local/bin/claude points on a native install), a link or copy (ln -s ... ./cc && ./cc --bare), $(which claude) --bare, "$(command -v claude)" --bare, exec -a foo claude --bare, npx/bunx/pnpm dlx @anthropic-ai/claude-code --bare, node .../cli.js --bare, npx @openai/codex exec, python3 -c 'os.system("claude --bare ..")', node -e, perl -e, at now <<< 'claude --bare ..', systemd-run --user claude --bare, and the env from a file: printf 'CLAUDE_CODE_SIMPLE=1\n' > e.env then . ./e.env; claude -p x, set -a; . ./e.env, env $(cat e.env) claude -p x, env -S 'CLAUDE_CODE_SIMPLE=1 claude -p x', or export CLAUDE_CODE_SIMPLE=1 written to ~/.bashrc then bash -ic 'claude -p x'. For gh the same guard refuses python -c, at and systemd-run (I checked), so the gap is that the nested-agent rule is not part of the text layer that reads unreadable programs (CUES, bin/actions-disable-guard:2009). Fix at the root: (a) recognise the program by what it is, not its name: a word whose realpath is under a claude/versions/ folder, a @anthropic-ai/claude-code or @openai/codex package word after npx/bunx/pnpm dlx/node, and a command word the guard cannot read ($(..), backticks, exec -a) followed by --bare; (b) add --bare, CLAUDE_CODE_SIMPLE and the codex start words to the cue layer, so text that flows into a program the guard cannot read is refused as gh text is; (c) refuse claude/codex in a command that sources a file or reads env from one (., source, set -a, env $(..), env -S, bash -i/-l) unless the guard reads that file. A tool call that starts a session of another provider (for example an MCP tool that delegates to a codex child) is outside every PreToolUse:Bash rule; the README's "Not covered" should name that and say the wall is the token's scope.
major: 2. The owner's code is not one-time: any agent that sees it can run any disable, on any repo, until the approval ends (up to 24 h). approval.approved (fork-kit/agent-guards/lib/agent_guards/approval.py:59-71) accepts the code in any command, any number of times, and nothing ties it to the repo, workflow or act the owner approved. The code travels in the command text, so it lands in the session transcript, the app's database and ps, all readable by every agent of the same user; one that was refused can search them for #owner-approved:actions-disable: and reuse a live code. README.md:55, the guard docstring (bin/actions-disable-guard:116) and the PR body call it a one-time code, and approval.py:1 says "for one ... refusal"; only the approve output says every command passes. Fix: bind the approval to the act: sudo agent-guards approve [--hours N] -- '<the exact command>' (or repo plus workflow/endpoint) and keep the SHA-256 of that normalised command next to the code's hash, so a replay can only repeat the act the owner approved; the hook cannot use up a root-owned file, so binding is the way to make it single-purpose. At least, fix the "one-time" wording and keep the default window short.
minor: 1. GraphQL updateRepositoryRuleset with enforcement EVALUATE in a variable passes: gh api graphql -f query='mutation($e: RuleEnforcement!) { updateRepositoryRuleset(input:{repositoryRulesetId:"x", enforcement: $e}) {..} }' -F e=EVALUATE, and -F i[enforcement]=EVALUATE with input:$i. The same with DISABLED is refused. Cause: seen is built with canon(x) (bin/actions-disable-guard:1398), which blanks text with no cue word, so "e=EVALUATE" is '' before OFF_WORD looks at it (:1417); the REST path got cue=False, this one did not. Fix: test OFF_WORD on canon(x, cue=False) for the GraphQL update, and add these two cases to the tests.
minor: 2. uninstall's older-session check (sbin/agent-guards-install, older_sessions) finds Claude Code only by an argv basename claude or @anthropic-ai/claude-code. A session started by the versioned binary path or a renamed link is not seen, so uninstall can remove the hooks under it and every Bash and Monitor call there is refused until it restarts (fails closed: availability only). Fix: also read /proc/<pid>/exe and match its realpath (a claude/versions/ folder).
nit: 1. onFailure is honoured only by recent Claude Code; the binary's own text says older CLIs "ignore it (a failed callback set to block lets the action run)". The README should name the first version that honours it, or self-check could print the CLI's version.
nit: 2. The binary says safe mode keeps managed hooks ("Only managed hooks run on this machine (an org policy, or safe mode)"), so refusing claude --safe-mode is not needed (harmless); the docstring and README should not list it as hookless.

scuttletoby and others added 9 commits November 22, 2026 03:55
…able is refused (lens B r2 minor 1)

The off word of updateRepositoryRuleset was looked for in canon() text, which blanks text with no cue
word, so `-F e=EVALUATE` (or a JSON variables block) was '' before OFF_WORD saw it. It is now read
without the cue words, as the REST ruleset body already was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…older, once (lens B r2 major 2)

`sudo agent-guards approve --command '<cmd>' [--cwd DIR]` now stores the hash of the
normalised command and the folder next to the code's hash (approval file version 2).
The guard passes only that command, ending in the marker, run in that folder, and
records the use in its state folder (O_EXCL link; the same tool_use_id passes again),
so the approval is used up. A code seen in a transcript, the app database or ps opens
no other command. A version 1 file counts as no approval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e and wrapper, and say what the guards are not (lens B r2 major 1)

A list of strings cannot be complete, so this does both things the review asked for:

(a) Wider detection where it is cheap and reliable. claude and codex now count by name, by their real
program path (.../claude/versions/<v>, the @anthropic-ai/claude-code and @openai/codex packages), as a
link to or a copy of the installed program, through npx, bunx, pnpm dlx, npm exec, bun x and
`node <their cli>`, behind `$(which claude)`, and inside python -c, node -e, perl -e, at, systemd-run
and the other wrappers already read for gh. CLAUDE_CODE_SIMPLE counts in the command, through env -S,
in a sourced file, in BASH_ENV/--rcfile and in the user's shell start files.

(b) The threat model, written plainly in the README ("What the guards are and are not") and the guard's
docstring: the guards stop mistakes and casual misuse; they are not a boundary against a hostile agent;
the boundary is the GitHub permissions of the agent's token (a fine-grained token without Actions and
Administration write is the recommended setup).

Codex arguments are now read option by option (an option's value is not taken for the subcommand),
because the new path and package forms need it; the separate codex nits follow in their own commit.

Tests: LensSecurityR2Test.test_r2_major1_* (each fails on 6d5047d).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ex mcp passes (lens A r2 nit)

`codex -m o3 exec x` is now refused as `codex exec` (the option's value is no longer taken for the
subcommand), `codex mcp list` (MCP setup, no session) passes, and `npx -y @openai/codex exec x` is refused
(the package form came with the major-1 commit). `codex mcp-server` stays refused.

Test: LensSecurityR2Test.test_r2_nit_codex_arguments_name_the_right_subcommand_mcp_passes_npx_refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ses inside a hooked session, remembers hand-wired entries (lens B r2 minor 2, lens A r2 minors 1 and 2)

- Sessions are found by the real path of their program (/proc/<pid>/exe: the native build in
  .../claude/versions/<v> under any name, the @anthropic-ai/claude-code script node runs through any
  link, an installed `claude`), not by the process name alone.
- The uninstall's own ancestors are no longer skipped: run from inside a Claude Code session that has
  the hooks, it refuses and says to run it from a terminal.
- A refusal for a hand-wired entry is remembered (/etc/agent-guards/hand-wired-seen.json, removed with
  /etc/agent-guards); the next run then counts every session older than itself, as does a run where the
  drop-in was never on. A broken record counts as seen now.
- The project .claude/settings*.json of each running session's working folder (and the folders above
  it) is searched too.

Tests: Install.test_r2_minorB2_*, test_r2_minorA1_*, test_r2_minorA2_* and test_r2_state_* (each fails on
6d5047d).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s onFailure, and how often a machine-file note shows (r2 nits)

- onFailure: "block" is honoured from Claude Code 2.1.295 on; older versions ignore it and let a
  failed or timed-out hook's call run (lens B r2 nit 1).
- A broken part of the machine file is named on every call the hook handles, once per hook with a
  problem, so a Bash call can carry it up to three times: kept loud on purpose, now said in the README
  (lens A r2 nit).
- The --safe-mode refusal is kept, with its reason in the README since the major-1 commit: safe mode
  runs managed hooks but not hooks wired by hand in user settings (lens B r2 nit 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…de Code session runs (follow-up to the session-check commit)

The session check now runs on every uninstall, so it must not refuse for a /proc/stat it does not need:
the boot time is read only once a Claude Code process is found, and an unreadable process list still
refuses with "cannot be read". Found by the shared fork-kit/common/tests/kit_install.test.py run (its
fake /proc has no stat file).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scuttletoby

Copy link
Copy Markdown
Owner Author

override for head a90b854: the round 2 fix diff (6d5047d..a90b854) checked against lens B r2 and lens A r2. The lens rounds are used up (2 of 2), so the orchestrator checked the fixes itself.

  • B major 2 (the approval is not one-time): fixed at the root (239c710). approval.py binds the approval to the hash of one normalised command and one folder, requires the marker to end the command, and records the one use with a temp file and os.link (it fails when the name is taken; the same tool_use_id passes again). A version 1 file counts as no approval. Known limit, written in the README: the use record lives in the agents' user's folder, so an agent that removes it can only repeat the approved command in that folder until the end time.
  • B major 1 (hookless nested sessions): the forms named in the finding are now refused (d249b38): real program path, link or copy, npx/bunx/pnpm dlx/npm exec/bun x/node cli, $(which ...), python/node/perl/ruby one-liners, at, systemd-run, exec -a, CLAUDE_CODE_SIMPLE through env -S, sourced files, BASH_ENV/--rcfile and shell start files. The README section "What the guards are and are not" says plainly that a list of forms is not complete and that the token's GitHub permissions are the real boundary. That plan is owner question Owner question: agent guards as a safety net, GitHub permissions as the hard limit #916.
  • B minor 1 (EVALUATE in a variable) (280d289), and B minor 2 with A minors 1 and 2 (uninstall finds sessions by program path, refuses inside a hooked session, remembers hand-wired entries, reads project settings) (2dffcfc, a90b854): fixed.
  • Tests: 19 new tests, all failing on 6d5047d; 393 agent-guards and common tests pass on the head. The merge chain merges only when fork-ci-result is green on this head.

🤖 Generated with Claude Code

@scuttletoby
scuttletoby merged commit 50b5d20 into main Nov 22, 2026
30 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