Skip to content

Agents don't reliably close their seed when prompted to#302

Merged
jayminwest merged 3 commits into
mainfrom
warren/run_s9zb0d0j8d8z
Jun 7, 2026
Merged

Agents don't reliably close their seed when prompted to#302
jayminwest merged 3 commits into
mainfrom
warren/run_s9zb0d0j8d8z

Conversation

@jayminwest
Copy link
Copy Markdown
Owner

Summary

feat: host-side seed-id close on successful reap (warren-0d2d)

Run

  • Warren run: run_s9zb0d0j8d8z
  • Agent: pi
  • Cost: $3.26 (102 in / 28.7k out / 7.9M cache-r)

Seeds

  • warren-0d2d — Agents don't reliably close their seed when prompted to

Commits (3)

  • c6c29be feat: host-side seed-id close on successful reap (warren-0d2d)
  • 4efebc0 chore: close warren-0d2d, record expertise, sync seeds
  • 0bda558 chore(warren): seeds state

Files changed

.mulch/expertise/reap.jsonl                        |   1 +
 .mulch/mulch.config.yaml                           |   1 +
 ...627Z_019e9f55-e343-7ef6-9429-f0fbd35b5c72.jsonl | 211 +++++++++++++++++++++
 .seeds/issues.jsonl                                |   2 +-
 scripts/file-size-budgets.json                     |   1 +
 src/runs/reap/run.ts                               |  31 ++-
 src/runs/reap/seeds.test.ts                        | 178 +++++++++++++++++
 src/runs/reap/seeds.ts                             |  30 +++
 src/runs/reap/test-helpers.ts                      |   1 +
 src/runs/reap/types.ts                             |   9 +
 src/runs/reap/util.ts                              |   1 +
 src/runs/watchdog.test.ts                          |   1 +
 src/seeds-cli/extensions.ts                        |  22 +++
 src/seeds-cli/index.ts                             |   1 +
 14 files changed, 487 insertions(+), 3 deletions(-)

Prompt

Show prompt
work on sd warren-0d2d. use ml. commit when done.

🤖 Opened by warren run run_s9zb0d0j8d8z

jayminwest and others added 3 commits June 7, 2026 00:01
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.
@jayminwest jayminwest enabled auto-merge (squash) June 7, 2026 00:04
@jayminwest jayminwest merged commit 5944991 into main Jun 7, 2026
2 checks passed
@jayminwest jayminwest deleted the warren/run_s9zb0d0j8d8z branch June 7, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant