Description
Writing human-oversight: confirmed into an ADR's frontmatter is gated by architect-oversight-marker-discipline.sh (PreToolUse on Edit and Write). The hook permits the edit only when /tmp/oversight-confirmed-<sha256-first16-of-ABSOLUTE-path>-<session_id> exists, where session_id comes from the hook's own stdin and the hash is computed from the ADR's absolute path. The companion wr-architect-mark-oversight-confirmed command is what writes that marker after a confirmation lands. Two bugs stop it matching:
-
The mark command hashes the path argument as given. Passing a repo-relative path (docs/decisions/029-....md) produces a marker keyed by the relative-path hash, while the hook keys by the absolute-path hash. The marker never matches, the edit stays blocked, and the command still prints success.
-
Session-ID discovery misses the main session. Even with an absolute path, the mark command writes the marker only under candidate session IDs it discovers by mtime-scanning /tmp/*-announced-* markers. In a multi-agent session those candidates are the subagents' IDs. The hook reads the main session's session_id from its own stdin, which is not in that discovered set.
Hit 2026-07-08 while ratifying two ADRs in a session with architect, JTBD, and risk-scorer subagents running concurrently: 21 markers were written, none under the ID the hook read, and the edit stayed blocked.
Symptoms
wr-architect-mark-oversight-confirmed reports success, and the subsequent Edit is still denied by the discipline hook.
- With a relative path argument, the marker filename's hash component does not match the hash the hook computes for the same file.
- In a multi-agent session, markers land under subagent session IDs while the hook reads the main session's ID from stdin.
Workaround
Pass the ADR's absolute path to wr-architect-mark-oversight-confirmed. If the Edit is still blocked, hand-write the marker for each candidate session UUID (readable from scratchpad and task-output paths):
H=$(printf '%s' "$ABS_ADR_PATH" | shasum -a 256 | cut -c1-16)
touch /tmp/oversight-confirmed-$H-<session-uuid>
then retry the Edit.
Affected plugin or component
@windyroad/wr-architect: the wr-architect-mark-oversight-confirmed command, against architect-oversight-marker-discipline.sh.
Frequency
Every ADR ratification where the mark command is given a relative path. The multi-agent case fired on the one session observed (2026-07-08); on the stated mechanism it should recur in any session with concurrent subagents, which the plugin suite's own gates routinely spawn.
Versions
- Local plugin:
@windyroad/wr-architect@0.20.2
- Upstream package:
@windyroad/wr-architect@0.20.2
- Claude Code CLI: 2.1.219 (Claude Code)
- Node: v24.16.0
- OS: Darwin 25.3.0 x86_64
Evidence
Suggested fix, two parts:
- Normalise the path argument to an absolute path inside the mark command before hashing, so callers cannot get this wrong.
- Resolve the current session ID the same way the discipline hook does, reading the authoritative runtime session-ID source rather than mtime-scanning announce markers. Failing that, write the marker under every plausible candidate including the one the hook will actually read.
Part 2 is the same multi-agent session-ID-resolution root class as the @windyroad/itil SID-helper picking a subagent UUID. The two helpers sit in different plugins but want the same resolution rule.
Additional context
The failure is silent from the caller's side. The command's success output and the hook's denial are the only two signals, and neither names the mismatch. Echoing the computed marker path on success would make the relative-path case self-diagnosing.
Cross-reference
Reported from the downstream addressr project; tracked locally as P046 in its docs/problems/ directory.
Description
Writing
human-oversight: confirmedinto an ADR's frontmatter is gated byarchitect-oversight-marker-discipline.sh(PreToolUse on Edit and Write). The hook permits the edit only when/tmp/oversight-confirmed-<sha256-first16-of-ABSOLUTE-path>-<session_id>exists, wheresession_idcomes from the hook's own stdin and the hash is computed from the ADR's absolute path. The companionwr-architect-mark-oversight-confirmedcommand is what writes that marker after a confirmation lands. Two bugs stop it matching:The mark command hashes the path argument as given. Passing a repo-relative path (
docs/decisions/029-....md) produces a marker keyed by the relative-path hash, while the hook keys by the absolute-path hash. The marker never matches, the edit stays blocked, and the command still prints success.Session-ID discovery misses the main session. Even with an absolute path, the mark command writes the marker only under candidate session IDs it discovers by mtime-scanning
/tmp/*-announced-*markers. In a multi-agent session those candidates are the subagents' IDs. The hook reads the main session'ssession_idfrom its own stdin, which is not in that discovered set.Hit 2026-07-08 while ratifying two ADRs in a session with architect, JTBD, and risk-scorer subagents running concurrently: 21 markers were written, none under the ID the hook read, and the edit stayed blocked.
Symptoms
wr-architect-mark-oversight-confirmedreports success, and the subsequent Edit is still denied by the discipline hook.Workaround
Pass the ADR's absolute path to
wr-architect-mark-oversight-confirmed. If the Edit is still blocked, hand-write the marker for each candidate session UUID (readable from scratchpad and task-output paths):then retry the Edit.
Affected plugin or component
@windyroad/wr-architect: thewr-architect-mark-oversight-confirmedcommand, againstarchitect-oversight-marker-discipline.sh.Frequency
Every ADR ratification where the mark command is given a relative path. The multi-agent case fired on the one session observed (2026-07-08); on the stated mechanism it should recur in any session with concurrent subagents, which the plugin suite's own gates routinely spawn.
Versions
@windyroad/wr-architect@0.20.2@windyroad/wr-architect@0.20.2Evidence
Suggested fix, two parts:
Part 2 is the same multi-agent session-ID-resolution root class as the
@windyroad/itilSID-helper picking a subagent UUID. The two helpers sit in different plugins but want the same resolution rule.Additional context
The failure is silent from the caller's side. The command's success output and the hook's denial are the only two signals, and neither names the mismatch. Echoing the computed marker path on success would make the relative-path case self-diagnosing.
Cross-reference
Reported from the downstream addressr project; tracked locally as P046 in its
docs/problems/directory.