Skip to content

bug: worker.md reservation constraint and progress reporting lost under context compression #49

Closed

Description

@jflowers

Summary

internal/agentkit/content/agents/worker.md is 27 lines. The numbered checklist (lines 14-20) is the best-structured content of any deployed agent file and survives compression reasonably well. However, the "Constraints" section (lines 22-27) contains critical behavioral rules as a flat bullet list that compressors are likely to summarize away.

Related to unbound-force/unbound-force#346 — same class of vulnerability (prompt constraints that do not survive context compression).

Specific Fragilities

1. Reservation-check constraint buried in bullet list (line 24)

- Only edit files you have reserved

First of four bullets in "Constraints." A compressor summarizing the worker would focus on the checklist (what to DO) and compress the constraints section to "works within assigned scope." The explicit reservation-check requirement gets lost, and a worker could edit files it never reserved — colliding with other workers.

2. No recovery path for expired/released reservations

The worker is told to reserve files (checklist step 3) and only edit reserved files (constraint), but there is no guidance for what happens if a reservation expires (TTL), is released by the coordinator, or fails to acquire. Under compression, there is zero chance this missing guidance would be inferred. A worker with a lost reservation would either stall or edit without a reservation.

3. Progress reporting (steps 5-6) dropped under compression pressure

Steps 5 (forge_progress) and 6 (hivemind_store) are "reporting" steps between the core work (step 4: implement) and the completion gate (step 7: forge_complete). Under compression, a summarizer is likely to keep the structural steps (init, reserve, implement, complete) and drop the reporting steps. Workers would silently complete without progress updates, leaving coordinators blind to worker state.

4. Constraint redundancy helps but phrasing varies

"Only edit files you have reserved" (line 24) and "Never modify files outside your assignment" (line 27) express overlapping constraints. Having both improves compression survival (two chances to keep the concept), but the phrasings are subtly different — "reserved" vs "assignment." Under compression, one might be kept while the other is dropped, and the surviving one might not clearly convey the reservation mechanism.

Proposed Hardening

  • Integrate critical constraints into the checklist itself rather than a separate section (e.g., "3. comms_reserve — reserve assigned files exclusively. NEVER edit unreserved files.")
  • Add a brief recovery instruction: "If reservation fails or expires, STOP and report to coordinator via comms_send"
  • Make progress reporting part of the structural flow rather than optional-looking middleware steps

References

Metadata

Metadata

Assignees

Labels

bugnext-release

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions