You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the repair study, several agent failures were caused by the agent running close --save-script mid-repair (without first committing via replay --from). Because this resulted in a silent no-op ({ written: false } with no error), the agents didn't realize the script wasn't written and retried in a loop, wasting their budget.
Solution
Loud Abort: Modified commitRepairBeforeClose in session-close.ts to return an explicit { kind: 'aborted' } when saveScriptComplete is false.
Clear Guidance: Updated the close handler to check for repair.aborted alongside --save-script. If triggered, it appends a loud, explicit warning describing exactly how to recover: "The repair was aborted and no script was written. Recovery: replay --from <n> --plan-digest <digest> before closing.".
Docs Update: Added the abort-on-close rule explicitly to the agent-device help workflow documentation (in src/cli/parser/cli-help.ts) right next to the resume step.
[P1] Aborted repair still exits successfully.session-close.ts only appends warning text, while both response paths still return ok: true; the CLI therefore exits 0 when close --save-script writes no artifact. That misses close --save-script on an uncommitted repair declines silently — make the abort loud #1380's explicit acceptance that the exit reflect that nothing was written. After teardown, return a typed/non-success abort result that preserves the abort and recovery guidance. Add a production-route regression proving the nonzero/error outcome and no artifact, plus coverage that plain close and committed-repair close remain unchanged.
CI also needs owner action: Lint & Format fails because src/daemon/handlers/session-close.ts does not pass pnpm format:check; all other current checks pass.
Re-review at 72067d47: the prior exit-status finding is fixed. The aborted close --save-script now tears down per ADR 0012 and returns ok: false with the requested abort/recovery guidance. The new provider-route test is non-vacuous and covers aborted, plain, and committed close paths.
The head is still not ready for validation:
armRepair(daemon: any, ...) never uses daemon; with noUnusedParameters, typecheck will fail.
let selection in the test and let text in session-close.ts are never reassigned, violating prefer-const.
the test has trailing whitespace at lines 68, 83, and 85, so format will fail.
all six exact-head workflows are action_required; an owner must authorize them after these static failures are fixed.
Re-review at a06a9120: the prior static blockers are fixed. The unused helper parameter is gone, the two immutable bindings now use const, and the patch is whitespace-clean. The functional abort result and its provider-route coverage remain sound; no new code finding on this delta.
Validation is still owner-blocked: CI, Linux, macOS, Android, iOS, and Size are all action_required, with no checks reported on this exact head. Please authorize the workflows. No ready-for-human label until those owner-action failures are cleared.
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
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.
Fixes #1380
Problem
In the repair study, several agent failures were caused by the agent running
close --save-scriptmid-repair (without first committing viareplay --from). Because this resulted in a silent no-op ({ written: false }with no error), the agents didn't realize the script wasn't written and retried in a loop, wasting their budget.Solution
commitRepairBeforeCloseinsession-close.tsto return an explicit{ kind: 'aborted' }whensaveScriptCompleteis false.closehandler to check forrepair.abortedalongside--save-script. If triggered, it appends a loud, explicit warning describing exactly how to recover:"The repair was aborted and no script was written. Recovery: replay --from <n> --plan-digest <digest> before closing.".agent-device help workflowdocumentation (insrc/cli/parser/cli-help.ts) right next to the resume step.