Skip to content

bug: /forge command review-before-complete ordering collapses under context compression #47

Closed

Description

@jflowers

Summary

internal/agentkit/content/command/forge.md defines a 9-step workflow where Step 7 (review) must happen before Step 8 (complete). Under DCP context compression, this ordering dependency is the most likely thing to be lost — the two steps get compressed into a single "review and complete workers" action, allowing the agent to skip reviews or complete before reviewing.

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

Specific Fragilities

1. Review-before-complete ordering (lines 21-22)

7. Review: forge_review(task_id, files_touched) for each completed worker
8. Complete: forge_complete(bead_id, summary, files_touched)

Numbered steps preserve ordering better than bullets, but a compressor summarizing a 9-step workflow is likely to merge these into "review and complete." The review step IS the quality gate.

2. Critical rule buried in middle of list (line 31)

- Review every worker's output before marking complete

Fifth of six bullets in the "Rules" section. Compressors tend to keep first and last items and drop the middle. This is the most important rule in the file and has the lowest compression survival position.

3. Error Recovery section dropped entirely (lines 61-67)

The "what to do when things go wrong" section is the first thing compressors drop — it looks like supplementary content. A coordinator with compressed context encountering a blocked worker would have no recovery instructions and could stall indefinitely or skip the blocked worker.

4. Strategy Selection section dropped (lines 34-42)

forge_get_strategy_insights call gets dropped, meaning the agent always uses default decomposition instead of learning from historical outcomes.

Proposed Hardening

  • Embed the ordering constraint directly in the step text: "7. Review FIRST: forge_review(...) — MUST complete before step 8"
  • Move "Review every worker before marking complete" from 5th bullet to 1st bullet, or promote to its own section header
  • Add a "Critical Invariants" section at the top of the file (before Workflow) that states the non-negotiable rules — compressors prioritize opening content
  • Consider inlining error recovery guidance at the monitoring step rather than as a separate section at the end

References

Activity

  1. added
    bug
    on Aug 2, 2026
  2. added a commit that references this issue on Aug 4, 2026
    b389f4b
  3. added 6 commits that reference this issue on Aug 7, 2026
    8cccfa5
    e2dece1
    0f6dc11
    ac80583
    50ae279
    73a19c7
  4. added 2 commits that reference this issue on Aug 11, 2026
    85b7da3
    6cdf333
  5. added 2 commits that reference this issue on Sep 1, 2026
    981eb35
    0be9e28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugnext-release

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions