The ticket blamed a wrong table list — that the hook catches tickets and
ticket_history but misses ticket_deps and ticket_idmap. Filing the T-454
findings disproved that: tickets and ticket_history were left unstaged
too, aborting the commit.
The hook has no logic to fix; it is one line delegating to
`pql plan export --stage`. That call reports writing both files and
stages neither, with rows_written 0. Tested both ways — untracked-new
and tracked-modified fail identically, so this is not about new-month
rollover. The only common factor is the zero row count.
Since ticket mutations already write through synchronously, the export
always finds nothing left to append, which makes rows_written 0 the
normal case and the staging step effectively dead. Changes that did
persist likely did so because another file in the commit was staged by
hand. The fix belongs in pql: stage on file state, not row count.
Raised to high — a silent data-loss path, invisible behind the hook's
`2>/dev/null || true`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
T-454 step 1 asked us to characterize the mechanism rather than assume
it. The original hypothesis — that the PID-keyed session registry under
~/.claude/sessions is what the remote surface enumerates — turns out to
be wrong; that registry is incidental.
Remote Control is enabled per-session over the stream-json control
channel clide already owns, via a `remote_control` control_request.
Claude Code ships a dedicated SDK-mode bridge alongside the interactive
TUI one, so no interactive session and no extra spawn flag are needed.
Verified live against clide's exact flag set.
Also records the prompt-arbitration model: first-to-apply wins, both
sides linked by the same request_id, loser retracts via
control_cancel_request, clear is idempotent. That is already the shipped
protocol rather than a policy clide has to invent — which narrows the
remaining work to honoring the retraction, since clide currently has no
control_cancel_request handling at all.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>