Repository navigation
Fresh install activates Claude name-guard hook before workspace linking supplies its target #237
Description
On a fresh workstation, openRepoTools --install writes Claude hooks before workspace initialization provides the executable path those hooks call. Please fix this in openRepoTools; workBenches will consume the corrected upstream pin rather than patching its vendored copy.
Upstream implementation request for workBenches #107. Brett requested this issue on 2026-10-17 while preparing workBenches 1.5.1. This report requests tracking and a fix here; no implementation approach has been selected.
Current behavior
The installer merges these entries into bare-user ~/.claude/settings.json:
- SessionStart:
~/projects/xFactory/lanes-edit.sh session-start || true - UserPromptSubmit:
~/projects/xFactory/lanes-edit.sh guard
Before openRepoTools wip init creates workspace configuration and link-estates provides the link, the target may not exist. The same window occurs if setup is interrupted between tool installation and workspace initialization. The SessionStart suffix suppresses its failure; the name guard can emit a command-not-found hook error on every prompt (exit 127 rather than its intended guard refusal, exit 2).
workBenches deliberately installs the command before running its wip init subcommand, so simply swapping the caller's setup order does not solve the dependency. Its current vendored openRepoTools pin is b1015f4672f9c107d939803c39846f8dbd3d78f3; the inspected upstream checkout also retains these hook command strings. No fresh runtime reproduction was performed for this upstream filing; the original report and current source inspection establish the path dependency.
Reproduction to cover
- Use a disposable home with no workspace configuration and no
~/projects/xFactory/lanes-edit.shlink. - Run the installer with its supported prerequisites and payload.
- Inspect the installed Claude hook entries and invoke the prompt hook before workspace initialization.
- Initialize/link the workspace, then verify hooks work and real guard refusals still propagate.
- Repeat with setup interrupted before initialization and with a dangling workspace link.
Expected result and constraints
- Fresh and interrupted setup must not leave a prompt hook calling a nonexistent executable.
- Once workspace initialization completes, required hooks are active and idempotent without manual settings repair.
- Preserve the intended name-guard enforcement, including exit 2 for real refusals. Do not append blanket
|| trueto the guard. - Keep openRepoTools as the sole installer/settings writer and reconcile the solution with its exact-string hook identity, conflict detection, and all-or-nothing install contract.
- Preserve unrelated user hooks/settings and private file modes; cover existing installs and migration of previously installed canonical entries.
- Add hermetic regressions for fresh install, interruption, successful initialization, repeat install, conflicts, and genuine guard rejection.
Possible approaches include deferring hook activation until successful workspace linking or using an upstream-owned stable hook entry point. Choose the approach in openRepoTools and document any contract change explicitly.
Downstream follow-up
After the upstream fix lands, workBenches should deliberately update its vendored pin and run estate/workspace installation and launcher acceptance. Keep workBenches #107 open to track that integration; filing this issue does not mean the defect is fixed or included in a published patch.
Activity
brettheap commentedon Oct 18, 2026
CLAIMED — lane openRepoTools-3, session 83619980-06bb-4469-ae73-2a8c5e61981a@Eagle, 2026-10-18T01:51:05Z, for #237
Logged in
lanes/log/openRepoTools-3.mdatf20a9ff60ef659bbbace45b4ce37c603a7e727b8.The three reads (lane-collision-protocol Rule 1):
brettheap commentedon Oct 18, 2026
Lane openRepoTools-3, 2026-10-18T01:5xZ: Brett Heap's merge word for this issue's PR.
Brett gave it in lane 3's session, verbatim: "yes, merge #237 when it's green". This follows his words "yes, claim #237 and put it in v1.1.0".
How lane 3 applies it. Lane 3 squash-merges #237's PR only when all of these hold:
tests,tests-no-submodule,guard-launch-mode) is green on the PR's head;Copilot reviews cannot be requested in this repository since 10-10, so the independent review stands in for them.
The plan.
~/projects/xFactory/lanes-edit.shresolves, or pointing them at a stable command the installer places. It is running now.The constraints, from this issue:
|| true;Lane: openRepoTools-3
Merge origin/main a41adb6 into fix/237-hook-gate before #237's review…
Refuse a guard entry #237 cannot take apart before anything is placed…
Correct #237's README mode sentence and wip init exits, and make its …
T008: openRepoTools leaves pipx's link to pipx, and refuses a venv-sh…
Merge origin/main 87a5e9d into fix/237-hook-gate, so CI tests #237 on…
--install and wip init add the hook pair only once ~/projects/xFactor…
PR 4 review: the assembly README cap holds 510, README's text is test…
Re-cut T006's assembly-0001 and regenerate T010's code-leg tests.yml …
brettheap commentedon Oct 19, 2026
RELEASED — lane openRepoTools-3, session 83619980-06bb-4469-ae73-2a8c5e61981a@Eagle, 2026-10-19T22:42:31Z, for #237 — #237 is closed: its fix landed on 2026-10-18 as 586dea2, so the claim of 2026-10-18T01:51Z has nothing left to hold
openRepoTools becomes the openrepotools package: pipx installs the wh…
Every push proves the package builds, installs and runs: tests.yml ga…
The record tells the truth about releases: the v1.0.0 notes are in th…
The v1.1.0 notes now say that the fixes for #255 and #280 are part of…
The assembly root's front door resolves the split's collisions: AGENT…