fix(daemon): prove a classic Claude launch from the seat's configured executable, as its fork already is #4223
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.80) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.80 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.080
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #4223"
general
weight: 0.35
mvschwarz
The problem
A seat whose Claude runs from a renamed or configured executable can be at its own prompt after an in-place continuation and never read ready.
An in-place continuation launches Claude from the executable it observed in the running seat: the
realpathof that Claude's own path (claudeContinuationExecutableinrestore-orchestrator.ts). Readiness and handover recovery prove the launch by finding that process. With no recorded executable, a renamed binary isn't recognised as Claude, so the proof never succeeds.Kayhusk's #3751 fixed this for the fork launch's record. Two launch records still named only a managed launch's executable:
launchedExecutable), which handover recovery proves. The fork's return had the same gap.What changes
- A wrapper that execs Claude by absolute path leaves the binary as that path, so the binary is what's recorded.
- A wrapper that keeps argv[0] (
exec -a "$0", as Nix'swrapProgramdoes) records itself.#!is recorded as a script (the managed launch's ownfileStartsWithShebangtest), and its launch runs in script-launch mode.- Its Claude is proved by the managed script-launch rules (
native-process-lineage.ts). It counts if it's a process in the pane's foreground named as Claude and running a Claude executable, or the script's direct child naming a Claude conversation. Either way it still needs this launch's own token, one candidate and a stable fingerprint.- So a readable wrapper never makes readiness worse than recording nothing did. A file that can't be read is treated as a plain file.
- Any other file is recorded with
isScriptfalse, and the existing proofs match it, a Nix wrapper and its wrapped sibling included.- Readiness asks for that proof for an in-place launch's current frame, and for a screen that doesn't show Claude's header (bypass mode, or a header scrolled out). There, while the process can't be seen or doesn't match, readiness keeps waiting as it does today.
- A screen that shows Claude's header reads ready from the screen, as before this PR. That check runs before the launch record is looked up.
- Nothing new refuses, and nothing is typed into the pane.
This is the last launch record with the gap: a search of the daemon finds no other place that records a launch's executable.
How it was checked
main: five new cases inclaude-fresh-in-place-scope.test.ts, beside #3751's case, all fail:- a configured fresh in-place launch stays not ready after its own frame is drawn;
- a configured resume at a headerless bypass prompt times out;
- the fresh, resume and fork launches return no executable.
- the 73 daemon test files that build the Claude adapter or name the launch records: 3,135 passed and 22 skipped, across two runs (one startup file was rerun after building the daemon, which the fresh worktree hadn't done);
- the daemon typecheck;
-
npm run lint.- Five configured kinds, each an in-place launch that must read ready on its own frame:
- a wrapper that keeps argv[0] and execs a native version;
- a wrapper that execs Claude by absolute path;
- a wrapper that execs a bare
claude;- a directly configured binary;
- a Nix wrapper and its wrapped sibling.
- Red at the second commit:
- the first two wrappers stay
awaiting_runtime("Waiting to confirm the new Claude process in this pane");- the bare-
claudewrapper reads ready, and fails only on its record'sisScript;- the binary and the Nix pair pass.
- Green: all 63 cases in that file. The same 73 files as above: 3,140 passed and 22 skipped.
npm run lintpasses.Not changed
claude-resume.ts) checks its process without an executable too. It keeps no launch record, so it's left as it is here.🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Claude launches now consistently report the configured executable, including fresh, resumed, forked, and classic continuation launches. This improves launch reporting when using custom executable paths or wrappers.
Fresh in-place launches wait for the configured process to display its first frame before showing the session as ready, including when the executable is renamed or invoked through a wrapper.
Classic continuations can be recognized when the prompt has no header.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->