inconsistent-agent-log

Inconsistent agent log artifacts: some agents have only output.log, others have metadata.json+prompt.txt+run.sh+output.log

Metadata

Statusdone
Assignedagent-52
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-26T16:56:47.118493548+00:00
Started2026-04-26T16:57:38.436394883+00:00
Completed2026-04-26T17:22:14.119146168+00:00
Tagseval-scheduled
Eval score0.66
└ blocking impact0.80
└ completeness0.55
└ coordination overhead0.80
└ correctness0.65
└ downstream usability0.70
└ efficiency0.70
└ intent fidelity0.72
└ style adherence0.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

Log