Metadata
| Status | done |
|---|---|
| Assigned | agent-899 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-28T00:55:02.494400573+00:00 |
| Started | 2026-04-28T00:56:23.925653145+00:00 |
| Completed | 2026-04-28T01:09:25.149836172+00:00 |
| Tags | eval-scheduled |
| Eval score | 0.77 |
| └ blocking impact | 0.90 |
| └ completeness | 0.90 |
| └ constraint fidelity | 0.85 |
| └ coordination overhead | 0.92 |
| └ correctness | 0.82 |
| └ downstream usability | 0.85 |
| └ efficiency | 0.85 |
| └ intent fidelity | 0.78 |
| └ style adherence | 0.80 |
Description
Description
Source: companion observation in /home/erik/workgraph/bug-dispatcher-poll-interval-too-slow.md ('Related observation' section).
wg reset --also-strip-meta resets task status but does NOT clear the claimed_by field. Result: after resetting 9 tasks, all 6 ready tasks were still claimed by dead agents from the previous run, so even when the dispatcher ticked it refused to spawn. User had to manually wg unclaim each one. From the user's POV this looked identical to the dispatcher-poll bug ('I reset and resumed, why is nothing happening?').
Fix
When wg reset resets a task to open, it should also clear claimed_by (and any other claim-related metadata: claim_expires_at, agent worktree pointers, etc. — audit what wg unclaim clears and mirror it). A task being reset should be ready for a fresh dispatcher pickup with no further hand-holding.
This is the 'do the obvious thing' fix. The user's quote: '...probably the right call — when you reset a task you almost certainly want it ready to be re-claimed.'
Edge cases to think about
- If the task is currently
in-progresswith a live agent attached, what does reset do? (Probably: refuse, or kill-agent-then-reset with explicit flag — match existingwg resetbehavior, just add unclaim to whatever path actually mutates state.) - Does
wg resetalready have a flag like--keep-claimfor advanced users? If yes, preserve it as an opt-out. If not, don't add one preemptively. - Status filter: only relevant for resets that move status backwards to
open/ready. Resetting to other statuses (if that's a thing) probably shouldn't auto-unclaim.
Validation
-
Failing test first: claim a task (set
claimed_by),wg reset <id>, assertclaimed_byis None -
Failing test:
wg reset --also-strip-meta <id>clearsclaimed_byAND the meta it strips today (regression check) - Failing test: reset on a task with no claim is a no-op for the claim field (doesn't crash)
-
Live smoke: claim 3 tasks,
wg resetthem, runwg ready→ all 3 appear ready (no stale claims blocking) -
Live smoke: dispatcher running at 5s poll → reset tasks get spawned on next tick without manual
wg unclaim - cargo build + cargo test pass with no regressions
Depends on
Required by
- (none)
Log
- 2026-04-28T00:55:02.488523317+00:00 Task paused
- 2026-04-28T00:55:08.907053393+00:00 Task published
- 2026-04-28T00:56:23.925656722+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-28T00:56:31.786312720+00:00 Starting work — exploring reset and unclaim implementations
- 2026-04-28T00:57:21.712031961+00:00 Found field: 'assigned' (not 'claimed_by'). Reset doesn't clear it; unclaim does. Will mirror unclaim's behavior in reset.
- 2026-04-28T01:01:23.988760742+00:00 Implementation complete. Tests pass. Running full test suite + live smoke.
- 2026-04-28T01:09:14.265132173+00:00 Committed: 80b46b17e — pushed to remote
- 2026-04-28T01:09:25.149839508+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-28T01:11:36.282565684+00:00 PendingEval → Done (evaluator passed; downstream unblocks)