Skip to content

Name guard (lane protocol Amendment 12): lanes-edit.sh guard as a UserPromptSubmit hook, lane-start --name on every launch, --install places the hook — after #24 lands #25

Closed

Description

@brettheap

Lane: openrepotools-3 (openRepoTools-3)

The tooling half of Lane Collision Protocol Amendment 12 — brettheap/new-workstation#22 (governing issue) and brettheap/new-workstation#23 (the DRAFT text). Brett Heap's ruling, in session, 2026-09-13, verbatim: "we need the session name and the lane name always the same. we need a gaurd on this and is must stop and refuse to work if they are not the same" — and "the openRepoProject-1 lane is moving the code to our repo. after that, we will take over the developemnt for these tools".

Waits for #24 (Amendment 9 act 3, lane openRepoProject-1), which brings lanes-edit.sh, lane-start, tests/test_lane_helpers.sh and the --install hook placement into this repository. Nothing here is built on top of that draft; the work starts from main after it lands.

Acts, on ratification of the amendment

  1. lanes-edit.sh guard — reads the hook JSON on stdin; window from here_context, live record (name, sessionId) from window_session, row from register-row (origin/main, R19); refuses (exit 2, triple + the one filled-in cure on stderr) when the window name, the session name and the row's last session id are not one lane, or when a read is indeterminate; silent exit 0 when they agree, when cwd is outside $PROJECTS_ROOT, or when the input carries agent_id. One test per state in the amendment's table, in tests/test_lane_helpers.sh (the sandbox already fakes tmux, the session records and the register).
  2. lane-start passes --name "$LANE" on cases (a) --resume <id> and (b) --resume <LANE> as it does on (c); test that the logged argv carries it on every case; live check that the CLI applies --name to a resumed session (2.1.270 help: "Set a display name for this session").
  3. openRepoTools --install places ~/projects/xFactory/lanes-edit.sh guard under UserPromptSubmit (timeout 5) in the profile's settings.json, beside the SessionStart hook; the workBenches launcher ensures it per run (its own follow-up there).
  4. session_start_block prints session name '<x>' is not the lane '<y>' — run: /rename <y> when they differ (read-only, as today).
  5. Eagle: every profile gets the hook; first live case is lane openRepoTools-3's own window.

Facts verified 2026-09-13: the session record at $CLAUDE_CONFIG_DIR/sessions/<pid>.json carries name/nameSource/tmux/sessionId; window_session already returns the name and, by its own comment, "decides nothing"; UserPromptSubmit exit 2 blocks the prompt (code.claude.com/docs/en/hooks); a UserPromptSubmit hook (the usage guard) already runs in every profile here.

🤖 Generated with Claude Code

Activity

  1. brettheap commented on Sep 13, 2026

    @brettheap
    ContributorAuthor

    Amendment 12 is IN FORCE (brettheap/new-workstation#23 → 5b990a1; ratified 2026-09-13, 'Ratify revision 2 (Recommended)', M1 'Type /rename into the pane (Recommended)'). Two things the ratified text adds to the acts listed above: clause (h) THE LOCK — the guard (and the SessionStart hook) renames a drifted session by typing /rename <lane> into its pane with tmux send-keys, and a person's own /rename to a lane name is an OFFER answered yes/no at the next prompt (yes runs the lane-start --no-launch act and writes MOVED on the lane left); and the proof that claude --resume <id> --name X renames the resumed conversation, so lane-start's --name on every case needs no fallback. Still waits for #24.

    Lane: openrepotools-3 (openRepoTools-3)

  2. brettheap commented on Sep 13, 2026

    @brettheap
    ContributorAuthor

    The guard's offer (clause (h): a rename to a lane name with no row) shows that repo's lane block before asking yes/no — the block is #28's lanes listing, decided by Brett Heap 2026-09-13; build the two together after #24.

    Lane: openrepotools-3 (openRepoTools-3)

  3. added 5 commits that reference this issue on Sep 14, 2026
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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions