Skip to content

v0.9.14: write-claim contention forbids N workers writing disjoint files under one shared root — the natural fan-out pattern is impossible #6278

Description

@Hmbown

Why this matters

The obvious delegation pattern — N parallel workers, one results directory, one disjoint output file each — is the one coord/ledger.rs:587 forbids: any write-roots overlap between active claims is rejected, including when their exact_files are disjoint. Models burn whole rounds discovering this: in one observed session, six read-only workers each writing their own file under tmp/anomaly/ were all refused, the model retried all five spawns identically, failed again, and only on the third round manually split into tmp/anomaly_w2…w6/ — eleven wasted spawns. Today's parallel wave work pays the same tax: our planner and designer both had to be given separate root directories for what is logically one output area.

Current behavior

crates/tui/src/tools/subagent/coord/ledger.rs:587 — the overlap check compares roots only; disjoint exact_files under a shared root still collide. The error text steers toward per-worker sibling roots, which the model must discover by trial and error.

Desired behavior

  1. Two active claims whose exact_files are disjoint may share a write root (the files are the real exclusion boundary).
  2. Alternatively (or additionally), a parent-declared shared root can auto-suffix per-worker subroots so the pattern needs no trial and error.

Acceptance criteria

  • Two concurrent workers with write_roots: ["tmp/scan"] and disjoint exact_files both start and both write without contention errors
  • Regression test in the coord ledger tests covering the disjoint-files-under-shared-root case
  • Overlap with truly intersecting exact_files is still refused

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsubagentsSub-agent orchestration, lifecycle, and completion handling

    Projects

    • Status
      Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions