Metadata
| Status | done |
|---|---|
| Assigned | agent-879 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-27T21:50:19.097971191+00:00 |
| Started | 2026-04-27T21:50:50.466196852+00:00 |
| Completed | 2026-04-27T22:17:58.878261031+00:00 |
| Tags | eval-scheduled |
Description
Description
Agent-777's first attempt produced commit e0aff8dbb on branch wg/agent-777/dispatcher-auto-respawns (worktree: /home/erik/workgraph/.wg-worktrees/agent-777). The retry failed unrelated to the work itself (native handler dispatched with no ANTHROPIC_API_KEY). The actual feature is implemented and committed — it just hasn't landed on main, and main has moved forward.
What's already done in e0aff8dbb (DO NOT redo)
- New
wg service purge-chatscommand +IpcRequest::PurgeChats(idempotent, falls back to direct graph mutation when daemon offline) - Supervisor mid-loop archive-check — exits cleanly when chat task is tagged
archived/ Done / Abandoned - Supervisor orphan exit removes
coordinator-state-N.jsonso restart doesn't resurrect dead chats - 4 new tests:
test_handle_purge_chats_archives_all_chats_idempotenttest_handle_purge_chats_empty_graph_is_nooptest_purge_chats_excludes_from_boot_enumerationtest_direct_purge_chats_archives_and_removes_state_files
Files touched: src/cli.rs, src/commands/service/coordinator_agent.rs, src/commands/service/ipc.rs, src/commands/service/mod.rs, src/main.rs (+477 / -4)
What's left
-
Rebase
wg/agent-777/dispatcher-auto-respawnsonto currentmain. The branch's diff against current main shows spurious reverts of:- CLAUDE.md "Agency tasks run on claude CLI" section (recently added to main — KEEP main's version)
- README.md install/setup section reorganization (KEEP main's version)
- docs/AGENT-GUIDE.md tweaks These are stale-base artifacts, not intentional reverts. Resolve by taking main's versions.
-
Verify the original parts 1+2 of the parent task are actually addressed by inspecting the committed code. The original task asked for two things:
- (a) idle-respawn rule — chat doesn't respawn when no consumer is connected and inbox is empty
- (b) bulk-purge command —
wg service purge-chatsThe commit message describes (b) clearly and a 'supervisor self-exit on archive' but it's not obvious from the message alone whether the idle-respawn rule (last-consumer timestamp + N-second idle threshold) is implemented or whether only the archived-respawn rule is. Read the diff and confirm — if (a) is missing, add it as part of this task.
-
Auto-migrate stale
.coordinator-Nids — the original task also called this out as a latent bug (Coordinator-1 spawning against deprecated.coordinator-1id, never migrated). Confirm whether e0aff8dbb addresses this; if not, either auto-runwg migrate chat-renameon dispatcher boot or have the supervisor self-archive when it sees a non-existent task id. -
Test the full scenario from the parent task's Validation list — the four bullets there (purge survives restart, idle-respawn rule, stale-id self-archive, manual smoke) are still the acceptance bar.
Validation
-
Branch rebased cleanly onto current main;
git diff main...HEADshows only feature-related changes (no CLAUDE.md/README reverts) - Idle-respawn rule confirmed implemented (read coordinator_agent.rs diff) OR added if missing — failing test first
-
Stale
.coordinator-Nself-archive confirmed implemented OR added if missing — failing test first - All 4 new tests from e0aff8dbb still pass post-rebase
-
cargo build+cargo testpass with no regressions -
Manual smoke from parent task: spawn 3 chats,
wg service purge-chats, restart dispatcher, verify (a) zero handler processes alive, (b) zero respawn attempts in 30s, (c) chat tasks remain in graph as archived, (d) chat history dirs intact - Manual smoke: spawn chat with no consumer + empty inbox → supervisor does NOT respawn within idle threshold
-
No deprecated config warnings introduced (don't reintroduce
agent.executor/dispatcher.executor)
Depends on
Required by
- (none)
Log
- 2026-04-27T21:50:19.089916022+00:00 Task paused
- 2026-04-27T21:50:21.169372642+00:00 Task published
- 2026-04-27T21:50:47.601771950+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Code integration task requiring git rebase, Rust code inspection, test writing/execution, and manual smoke testing — only programmer-class agent available with proven track record (0.72 score, 137 tasks).
- 2026-04-27T21:50:50.466203325+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-27T21:51:02.702757825+00:00 Starting work — orienting myself. Worktree clean, on wg/agent-879/land-dispatcher-auto branch with no commits ahead of main yet.
- 2026-04-27T21:52:29.123631025+00:00 agent-777's e0aff8dbb is already squash-merged onto main as b0f3927ef. No rebase needed. Now auditing what's actually present vs the parent task's requirements.
- 2026-04-27T21:55:56.149938272+00:00 Idle-respawn rule (a) is NOT in e0aff8dbb. Only mid-loop archive-check is. Adding idle-respawn rule: chat_session_is_idle helper + supervisor integration. TDD.
- 2026-04-27T22:17:23.630982070+00:00 Validated: 11 new tests pass (5 idle-respawn + 4 task-resolution + 1 orphan-supervisor + 1 already in e0aff8dbb suite). cargo build clean. cargo test --lib --bins: 8 pre-existing failures on main (verified via /tmp worktree); zero new failures from my changes. Manual smoke daemon-offline: archives 3 chats, removes state files, preserves history dirs + inbox/outbox files, idempotent re-run yields zero new archives, no deprecated config warnings.
- 2026-04-27T22:17:51.399758149+00:00 Committed: 02c538f39 — pushed to remote
- 2026-04-27T22:17:58.878264247+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-27T22:18:19.684841676+00:00 PendingEval → Done (evaluator passed; downstream unblocks)