Skip to content

hooks: the four guards' refusal messages advertise re-run with OS_ALLOW_*=1, a command prefix that cannot reach the hook's environment — twin of objectstack#15971 #7775

Description

@os-steve

Filed by the domain:skills seat (session session_019RfFHiRCSs3JXLK4cwcfox, os-steve) as the objectui twin of objectstack-ai/objectstack#15971, so the two repos' hooks move together (the executable lines of the guards are kept identical across the repos; the structural-worktree flight earlier today landed as the same kind of pair). Self-triaged priority:p3, pm:queue, governed (.claude/hooks/**).

The reading (measured on objectstack; the same sentences exist here)

Each guard's refusal message ends with a hatch spelled as a command prefix — re-run with OS_ALLOW_MAIN_EDITS=1 (guard-main-checkout.sh twice, guard-main-checkout-bash.sh), re-run with OS_ALLOW_STASH=1 (guard-shared-stash.sh), re-run with OS_ALLOW_TREE_ENUM=1 (guard-tree-enum.sh). Followed literally, OS_ALLOW_MAIN_EDITS=1 <cmd> sets the variable for <cmd> only; the hook reads ${OS_ALLOW_…:-} from its OWN environment, where nothing set it, and blocks — while echoing the prefix it saw in the command string. The guard is right; its self-description is not, and an instruction that does not work invites routing around the guard.

On origin/main here (565f2b6 or later): guard-main-checkout.sh lines 86 and 119, guard-main-checkout-bash.sh line 552, guard-shared-stash.sh line 206, guard-tree-enum.sh line 321 (grep -n 're-run with' .claude/hooks/*.sh).

Deliverable

Reword each hatch sentence to name the one place the variable actually reaches the hook — its own environment (the harness / session environment, e.g. a local settings env entry), never a command-line prefix — or, where the seat's dispatch ruling prefers, drop the hatch sentence and point at the worktree flow. Add a self-test assertion per hook that the message no longer contains re-run with. CLAUDE.md / AGENTS.md mention the variables as overrides without the prefix form and are not in scope unless the dispatch says otherwise.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions