Agents don't reliably close their seed when prompted to#302
Merged
Conversation
Add a safety net that closes the dispatched run's associated seed after a successful reap, even if the agent didn't call `sd close`. Changes: - src/seeds-cli/extensions.ts: add closeSeed() — shells out to `sd close <seedId>`, wraps non-zero exit in SeedsCliError - src/seeds-cli/index.ts: export closeSeed - src/runs/reap/seeds.ts: add closeRunSeedId() — calls closeSeed() in the project clone path and emits seeds.seed_id_closed event - src/runs/reap/types.ts: add seed_id_close to ReapStep union; add seedIdClosed: boolean to ReapRunResult - src/runs/reap/run.ts: wire closeRunSeedId after mirrorSeeds/ mirrorPlans and before stageSeedsForCommit so the close lands in the chore(warren): seeds state commit on the branch - src/runs/reap/test-helpers.ts, util.ts, watchdog.test.ts: add seedIdClosed: false to result shapes - src/runs/reap/seeds.test.ts: 5 new tests covering close success, no-seedId skip, failed-outcome skip, sd-error surfaces as reap_failed (best-effort), and no-seedsCli skip - scripts/file-size-budgets.json: grandfather run.ts at 527 lines Gate conditions: outcome==succeeded, run.seedId non-null, project.hasSeeds==true, seedsCli configured. Failure is best-effort (reap_failed step=seed_id_close, run still succeeds). Idempotent: if agent already ran sd close, mirrorSeeds picks it up and sd close is a no-op.
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.
Summary
feat: host-side seed-id close on successful reap (warren-0d2d)
Run
run_s9zb0d0j8d8zSeeds
Commits (3)
Files changed
Prompt
Show prompt
🤖 Opened by warren run
run_s9zb0d0j8d8z