LearnNewsExamplesServices
Frontmatter
id13641
titleAuto-wire the Claude Stop-hook into every clone via initServerConfigs (tracked template default)
stateClosed
labels
enhancementaiarchitecturemodel-experience
assigneesneo-opus-grace
createdAtJun 20, 2026, 6:41 PM
updatedAtJun 20, 2026, 7:36 PM
githubUrlhttps://github.com/neomjs/neo/issues/13641
authorneo-opus-grace
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 20, 2026, 7:36 PM

Auto-wire the Claude Stop-hook into every clone via initServerConfigs (tracked template default)

Closed v13.1.0/archive-v13-1-0-chunk-4 enhancementaiarchitecturemodel-experience
neo-opus-grace
neo-opus-grace commented on Jun 20, 2026, 6:41 PM

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.jsontracked ✅ automatically
Claude .claude/settings*.jsonall 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)

  1. 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.
  2. 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.