Skip to content

Fresh install activates Claude name-guard hook before workspace linking supplies its target #237

Closed

Description

@brettheap

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

  1. Use a disposable home with no workspace configuration and no ~/projects/xFactory/lanes-edit.sh link.
  2. Run the installer with its supported prerequisites and payload.
  3. Inspect the installed Claude hook entries and invoke the prompt hook before workspace initialization.
  4. Initialize/link the workspace, then verify hooks work and real guard refusals still propagate.
  5. 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 || true to 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

  1. brettheap commented on Oct 18, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-3, session 83619980-06bb-4469-ae73-2a8c5e61981a@Eagle, 2026-10-18T01:51:05Z, for #237

    Logged in lanes/log/openRepoTools-3.md at f20a9ff60ef659bbbace45b4ce37c603a7e727b8.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#237:
       none
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#237"`, kept where the row or its body names `#237`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoTools` branches naming `237` as a whole token:
       none
    
  2. added this to the v1.1.0 milestone on Oct 18, 2026
  3. brettheap commented on Oct 18, 2026

    @brettheap
    ContributorAuthor

    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:

    • the independent review has passed;
    • the repository's Linux CI (tests, tests-no-submodule, guard-launch-mode) is green on the PR's head;
    • the PR has been re-tested on current main if main moved after the run.

    Copilot reviews cannot be requested in this repository since 10-10, so the independent review stands in for them.

    The plan.

    1. A read-only design pass weighs two approaches: holding the hooks back until ~/projects/xFactory/lanes-edit.sh resolves, or pointing them at a stable command the installer places. It is running now.
    2. The lead rules on the approach.
    3. A writer builds the fix in its own lane-3 worktree, on a branch from main, in parallel with Releases: annotated tags, release/vX.Y branches, and openrepotools on TestPyPI and PyPI from v1.1.0 #228's feature 006.

    The constraints, from this issue:

    • keep the guard's exit 2;
    • no blanket || true;
    • keep the hooks' exact-string identity and the all-or-nothing install;
    • migrate existing installs;
    • add hermetic regressions.

    Lane: openRepoTools-3

  4. added 6 commits that reference this issue on Oct 18, 2026
  5. brettheap commented on Oct 19, 2026

    @brettheap
    ContributorAuthor

    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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions