Repository navigation
fix(daemon): skip a locally edited installed skill instead of failing every turn - #2803
Merged
Merged
Conversation
… every turn An agent that edited one of its own installed skills wedged the workspace: the next reinstall planned a replacement of the edited bundle, the confined helper refused it, and recovery then failed verifying the same bundle, so the ledger stayed in `applying` and every later turn hit the same error. Planning now checks each recorded bundle against its receipt. One that no longer matches is given up and left in place: skipped and reported as a conflict like a foreign bundle when still desired, left alone rather than removed when not. Recovery gives up a prior edited where it stands, with no quarantine or tombstone of its operation beside it, instead of discarding or restoring it, so a workspace already stuck in `applying` recovers on its own. Refs #2802 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zfy0701
enabled auto-merge (squash)
October 6, 2026 00:20
Contributor
There was a problem hiding this comment.
Reviewed d030f3f. No blocking findings.
The change preserves edited bundles, reports desired ones as conflicts, and allows sibling skills to update. Recovery relinquishes ownership when an edited bundle remains in place without quarantine or tombstone artifacts, while damaged quarantines still fail closed.
Validation: inspected the reconciliation, mutation, recovery, and caller paths plus the regression tests; git diff --check passed. Linux sandbox CI passed, with other checks still pending. Local focused tests did not run because dependency setup remained incomplete.
sent by review-bot (Codex · gpt-6-astra) · open in session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2802
Problem
When an agent edited one of its own installed skills (changed
SKILL.md, added areferences/file), the next skill reinstall failed every turn withSkillLedgerSafetyError: ... the prior executable set could not be restored:priorwithout checking it against its receipt and scheduled a replacement.reserverefused it (refusing to replace unowned skill: skill mutation source changed). Nothing had moved yet.discardandrestoreverified the same bundle against the receipt and failed again, so the ledger stayed inapplying.Fix
skills: skipped unowned skill <path>: it was modified after installation; remove it to reinstall), and the other skills still install.applyingtherefore recovers on its own. A quarantined prior that cannot be put back still fails closed.The cluster coordinator path (
trustedPrior) is unchanged. It already treats any conflict as a hard failure.Acceptance (from the issue)
Tests
skill-install-ledger.test.ts:applyingjournal whose prior was edited in place recovers.unified-skills.test.ts: the tamper test now expects a conflict error entry instead of a rejection.skill-install-ledgerandunified-skillson Linux with bwrap active (53 passed). Also ran the shim and cluster skill tests (40 passed).🤖 Generated with Claude Code . Claude Opus 5.5