Metadata
| Status | done |
|---|---|
| Assigned | agent-52 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-26T16:56:47.118493548+00:00 |
| Started | 2026-04-26T16:57:38.436394883+00:00 |
| Completed | 2026-04-26T17:22:14.119146168+00:00 |
| Tags | eval-scheduled |
| Eval score | 0.66 |
| └ blocking impact | 0.80 |
| └ completeness | 0.55 |
| └ coordination overhead | 0.80 |
| └ correctness | 0.65 |
| └ downstream usability | 0.70 |
| └ efficiency | 0.70 |
| └ intent fidelity | 0.72 |
| └ style adherence | 0.55 |
Description
Description
ls .wg/agents/agent-N shows two distinct file sets across agents:
- Minimal (e.g. agent-1, agent-10, agent-13, agent-17, agent-18, agent-21, agent-22): just
output.log - Full (e.g. agent-11, agent-12, agent-14, agent-15, agent-16, agent-19, agent-20):
metadata.json+output.log+prompt.txt+run.sh
This means there are TWO code paths spawning agents, emitting different artifacts. The minimal-set agents are missing the prompt + metadata + run.sh, which makes debugging and replay impossible for them.
Diagnose first
Find both spawn paths (likely src/commands/spawn_task.rs for the unified path; an older path may live in src/commands/spawn.rs or in executor-specific code). Determine which is canonical and why some agents went through the older path.
Fix
- Pick one canonical spawn path (the full-set one — it preserves more debug context).
- All executors / all spawn callers go through the canonical path.
- Existing minimal-artifact agents in the registry can stay as-is (don't backfill); just ensure no NEW agent spawns with the minimal set.
- Document the agent dir contract (what files are guaranteed, what each contains) in a comment near the spawn code AND in docs/AGENT-SERVICE.md.
Validation
-
Failing tests first:
- test_all_executor_spawns_emit_metadata — for each executor (claude, native, shell), spawning produces metadata.json + prompt.txt + run.sh + output.log
- test_no_minimal_artifact_spawn_path — grep src/ for code that creates an agent dir without the full file set; assert no such path exists (or is gated behind a deprecated/test-only flag)
- Implementation makes tests pass
- cargo build + cargo test pass with no regressions
- Manual smoke: spawn a fresh task, agent dir contains all 4 expected files (metadata.json, prompt.txt, run.sh, output.log)
Depends on
Required by
- (none)
Log
- 2026-04-26T16:56:47.117816994+00:00 Task paused
- 2026-04-26T16:57:14.464631199+00:00 Task published
- 2026-04-26T16:57:37.999788536+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer matches the code diagnosis, refactoring, and test-writing requirements; Careful tradeoff suits infrastructure code where consistency bugs cascade to all agents.
- 2026-04-26T16:57:38.436399993+00:00 Spawned by coordinator --executor claude --model claude-opus-4-6
- 2026-04-26T17:04:27.942461350+00:00 Starting work: diagnosing dual spawn paths for agent artifacts
- 2026-04-26T17:05:48.868156734+00:00 Diagnosis: Two inline spawn paths in coordinator.rs (spawn_eval_inline at L2621, spawn_assign_inline at L2845) create only output.log. The canonical full path in spawn/execution.rs (spawn_agent_inner) creates metadata.json + prompt.txt + run.sh + output.log. Fix: add metadata.json, prompt.txt, and run.sh to both inline paths.
- 2026-04-26T17:22:03.071718555+00:00 Validated: cargo build + cargo test pass (6 pre-existing failures unchanged). Committed: bf4b7f529 — pushed to remote
- 2026-04-26T17:22:14.119153782+00:00 Task marked as done