What is the impact?
Doctor or repair does not recover the install
What happened?
I expected install-state to list only what the current install plan writes. Instead, it keeps operations from a previous install-state that the current plan no longer contains.
With install.sh --profile custom --enable-hooks --target claude --dry-run --json at 1ac07903, the plan has 955 plannedOperations, but statePreview.operations has 957. The two extra records are:
copy-file hooks/hooks.json -> ~/.claude/hooks/hooks.json (no longer shipped for this target; hooks are registered in settings.json instead)
copy-file scripts/lib/cost-estimate.js -> ~/.claude/scripts/lib/cost-estimate.js (source removed in 08c1c407)
Because the records survive every install, doctor.js reports them for good. The stale hooks.json copy shows as drifted, or as missing once it's removed, and cost-estimate.js always shows as a missing source. Neither a normal install nor uninstall plus install clears them. Uninstall keeps the drifted hooks.json copy, so the old install-state is not removed and gets carried into the next one.
Steps:
- Install at a pin that ships
hooks/hooks.json and scripts/lib/cost-estimate.js.
- Update to
1ac07903 and install again.
- Run
node scripts/doctor.js --json: missing-source-files for cost-estimate.js, and drifted-managed-files for hooks.json.
- Run uninstall, then install: both findings are still there.
Expected: records not in the current plan are dropped from install-state (and their files removed if unmodified, or reported once as orphaned).
Harness
Claude Code
Install method
Harness-specific installer target
Operating system
macOS
ECC and harness versions
ECC 2.2.1 at 1ac07903
Optional redacted diagnostics
claude-home: 1 managed file(s) are missing (~/.claude/hooks/hooks.json)
claude-home: 1 source file(s) referenced by install-state are missing (scripts/lib/cost-estimate.js)
What is the impact?
Doctor or repair does not recover the install
What happened?
I expected install-state to list only what the current install plan writes. Instead, it keeps operations from a previous install-state that the current plan no longer contains.
With
install.sh --profile custom --enable-hooks --target claude --dry-run --jsonat1ac07903, the plan has 955plannedOperations, butstatePreview.operationshas 957. The two extra records are:copy-file hooks/hooks.json -> ~/.claude/hooks/hooks.json(no longer shipped for this target; hooks are registered insettings.jsoninstead)copy-file scripts/lib/cost-estimate.js -> ~/.claude/scripts/lib/cost-estimate.js(source removed in08c1c407)Because the records survive every install,
doctor.jsreports them for good. The stalehooks.jsoncopy shows as drifted, or as missing once it's removed, andcost-estimate.jsalways shows as a missing source. Neither a normal install nor uninstall plus install clears them. Uninstall keeps the driftedhooks.jsoncopy, so the old install-state is not removed and gets carried into the next one.Steps:
hooks/hooks.jsonandscripts/lib/cost-estimate.js.1ac07903and install again.node scripts/doctor.js --json:missing-source-filesforcost-estimate.js, anddrifted-managed-filesforhooks.json.Expected: records not in the current plan are dropped from install-state (and their files removed if unmodified, or reported once as orphaned).
Harness
Claude Code
Install method
Harness-specific installer target
Operating system
macOS
ECC and harness versions
ECC 2.2.1 at
1ac07903Optional redacted diagnostics