Problem
The Claude Stop-hook (laneStateStopHook.mjs, shipped #13589/#13629) has never been active in any clone. Root cause is a tracked-activation asymmetry vs. Codex:
|
Activation path |
Ships to clones? |
| Codex |
.codex/hooks.json — tracked |
✅ automatically |
| Claude |
.claude/settings*.json — all gitignored; settings.template.json had zero hooks block |
❌ never reached any clone |
So @tobiu has been hand-wiring (or not) per-repo across ~7 clones. This session, @neo-opus-grace + @neo-opus-ada + @neo-opus-vega each independently re-discovered "hook not wired + dry-run-only" with zero coordination — the operator flagged both the gap and the wasted effort.
Fix (this ticket)
- Add the Stop-hook block to the tracked
.claude/settings.template.json (NEO_LANE_STATE_ENFORCE=1, portable $(git rev-parse --show-toplevel) path, timeout:10) — operator-provided wiring.
- Add
initClaudeSettings() to ai/scripts/setup/initServerConfigs.mjs that materializes settings.template.json → the gitignored .claude/settings.json on every npm prepare / npm run prepare -- --migrate-config (the existing post-pull config-materialization flow). Mirrors the established initConfigs / initTier1Config template→overlay pattern.
Acceptance Criteria
- AC1: Running
node ai/scripts/setup/initServerConfigs.mjs (or npm prepare) wires the Stop hook into .claude/settings.json, idempotently (second run = no-op), preserving any existing keys (permissions, local edits) and non-Stop hook events.
- AC2: A fresh clone with no
.claude/settings.json materializes the full template (permissions + hooks).
- AC3: Peers self-wire on pull with no manual per-repo management — the operator no longer hand-manages config across clones.
Dependency / sequencing note
enforce=1 only resolves "not picking up lanes" once the emission-substrate gap is closed: the parser wants a fenced ```lane-state JSON block, but skills emit a prose lane-state: line (post-review-pickup §2.5/§2.6). Until that lands (separate lane — Vega/Ada lane-state domain), enforce would block every turn until the 8-block override. This ticket ships the auto-wiring mechanism; the operator/team controls when clones restart into enforce.
Refs #13623, #13624, #13628. Part of the no-hold-state arc.
Problem
The Claude Stop-hook (
laneStateStopHook.mjs, shipped #13589/#13629) has never been active in any clone. Root cause is a tracked-activation asymmetry vs. Codex:.codex/hooks.json— tracked.claude/settings*.json— all gitignored;settings.template.jsonhad zero hooks blockSo @tobiu has been hand-wiring (or not) per-repo across ~7 clones. This session, @neo-opus-grace + @neo-opus-ada + @neo-opus-vega each independently re-discovered "hook not wired + dry-run-only" with zero coordination — the operator flagged both the gap and the wasted effort.
Fix (this ticket)
.claude/settings.template.json(NEO_LANE_STATE_ENFORCE=1, portable$(git rev-parse --show-toplevel)path,timeout:10) — operator-provided wiring.initClaudeSettings()toai/scripts/setup/initServerConfigs.mjsthat materializessettings.template.json→ the gitignored.claude/settings.jsonon everynpm prepare/npm run prepare -- --migrate-config(the existing post-pull config-materialization flow). Mirrors the establishedinitConfigs/initTier1Configtemplate→overlay pattern.Acceptance Criteria
node ai/scripts/setup/initServerConfigs.mjs(ornpm prepare) wires the Stop hook into.claude/settings.json, idempotently (second run = no-op), preserving any existing keys (permissions, local edits) and non-Stophook events..claude/settings.jsonmaterializes the full template (permissions + hooks).Dependency / sequencing note
enforce=1only resolves "not picking up lanes" once the emission-substrate gap is closed: the parser wants a fenced```lane-stateJSON block, but skills emit a proselane-state:line (post-review-pickup §2.5/§2.6). Until that lands (separate lane — Vega/Ada lane-state domain), enforce would block every turn until the 8-block override. This ticket ships the auto-wiring mechanism; the operator/team controls when clones restart into enforce.Refs #13623, #13624, #13628. Part of the no-hold-state arc.