Skip to content

Not an issue but an observation: Compound bead titles produce unbounded self-decomposition — which layer owns this? #22

Description

@brianhendry

Summary

A bead whose title names several deliverables reliably causes the worker to create sub-issues via bead create instead of doing the work. Across two runs of one such bead, roughly 16 sub-beads appeared, including near-duplicates. The parent reached revision 15 and was never completed. Nothing capped or flagged the growth.

Filed as an observation rather than a bug, because the sub-beads are created by the agent, not by NEEDLE. Whether this stems from NEEDLE's dispatch prompt, from Claude Code's own behaviour, or from the interaction of the two, I can't tell from outside. Happy to be told this belongs elsewhere.

Environment

needle 0.6.0
bead-rs 0.2.4
Ubuntu 22.04.5 LTS on WSL2 (Windows 11)
Python 3.10.12, pytest 6.2.5, tmux
Agent: claude

The trigger

Bead title that split (five deliverables named):

Add scripts/__init__.py and scripts/money.py providing MINOR_UNITS, to_minor,
from_minor and convert, so tests/test_money.py passes. Amounts are integers in
minor units. Rates must be Decimal or str and must reject float. Round once with
ROUND_HALF_UP. Do not use floating point anywhere.

Sub-beads created, both runs splitting along the same seam:

Add scripts/__init__.py package marker and MINOR_UNITS ISO 4217 dict
Add to_minor and from_minor functions to scripts/money.py
Add convert function to scripts/money.py with rate validation and ROUND_HALF_UP
Add MINOR_UNITS dict and to_minor function to scripts/money.py     <- near-duplicate
Add from_minor function to scripts/money.py                        <- near-duplicate
Add convert function with Decimal rate validation and ROUND_HALF_UP to scripts/money.py
Add scripts/__init__.py to make scripts a Python package
Verify all 12 tests in tests/test_money.py pass
[... roughly 8 more across the second run ...]

Two observations that may narrow the cause

1. It splits even when the work is already done. In the second run scripts/money.py was already committed and passing — pytest tests/test_money.py gave 12 passed and the whole suite exited 0. The worker still decomposed the parent, and never claimed it. The decision does not appear to consider whether the bead is already satisfied.

2. In the first run the agent was failing instantly. Event log, all within one second, repeating:

CLAIMED lab-98595c67
transform.started lab-98595c67
AGENT_DONE lab-98595c67 (exit=-1, 0ms)
verification.failed lab-98595c67
HANDLED lab-98595c67 (failure → released)
RELEASED lab-98595c67

exit=-1, 0ms suggests the agent process never really ran. No quarantine engaged despite repeated failures on the same bead.

The fix that worked

Replacing the parent with a title naming one deliverable and one acceptance test, plus an explicit instruction:

Create scripts/money.py and scripts/__init__.py so that
python3 -m pytest -q tests/test_money.py passes. Work on this issue directly.
Do not create sub-issues, do not split this work, and do not decompose it into
smaller tasks.

Result: zero sub-beads, bead closed in under 60 seconds, dependent bead released automatically, bead count flat. Same tests, same gate, same workspace — only the title differed. The instruction has since been used in every bead across five further experiments with no recurrence.

Impact

For unattended runs the concern is task multiplication: sixteen beads from one, some duplicating each other, with the real parent starving. Compounding this, needle status counts claims rather than completions, so a fragmenting run reports rising throughput while completing nothing.

Possible directions

  • A cap on sub-issues created per parent bead, or a warning above a threshold.
  • Check whether the parent's gate already passes before decomposing.
  • Make decomposition explicit — a flag or a bead field — rather than emergent.
  • If this is squarely agent behaviour, a note in the docs recommending single-deliverable bead titles would save others some time.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions