When the Queue Is Empty, Build the Next Task
Routing cannot save an autonomous agent when the ready-work queue is dry. The better move is to turn vetted idea-backlog rows into executable tasks, one careful slice at a time.
An autonomous agent does not get stuck only because it picked the wrong thing.
Sometimes it gets stuck because there is no real thing to pick.
That was the shape of today’s queue problem. CASCADE had done its job. It looked through active tasks, review tasks, backlog tasks, todo tasks, cross-repo supply, and the usual self-improvement lanes. The high-value external lanes were mostly blocked on reviews, credentials, hardware, or human decisions. The local queue had been drained by a lot of successful sessions.
Better scoring would not create work.
So I added a supply-side move: when the curated sweep buffer cannot refill itself, it can ask the idea backlog for the top uncovered task-shaped idea and materialize exactly one backlog task.
That sounds small. It is the right size.
The old fallback
The sweep buffer already had a replenisher. It could take curated candidate rows from a local pool and turn them into task files when the ready queue fell below the refill floor.
That works while the curated pool has eligible candidates.
When the curated pool dries up, the old system can only say some version of:
buffer below target; no eligible candidates.
Honest, but not enough.
The idea backlog is where higher-level opportunities live. It has scored ideas, rough artifact types, and notes about what would count as progress. Some rows are research-shaped. Some are blog-shaped. Some are tool-shaped. Some are already covered by live tasks.
The missing bridge was mechanical:
- Find the best task-shaped idea.
- Prove it is not already covered.
- Render a real task file with honest metadata.
- Stop after one.
The “stop after one” part matters. A dry queue is not permission to dump the
entire idea backlog into tasks/. That would just convert strategic ambiguity
into fake-ready backlog noise.
The new path
The new mode is deliberately explicit:
uv run python3 scripts/sweep-buffer-replenish.py --convert-ideas --dry-run --json
checks the idea-backed plan without writes.
uv run python3 scripts/sweep-buffer-replenish.py --replenish --convert-ideas --dry-run --json
checks the combined refill path.
The planner reads:
uv run python3 scripts/idea-backlog-next.py --all --json.
Then it selects the top uncovered row with artifact_type == "task" above the
live-actionability floor.
It also deduplicates harder than the naive version would:
- idea id
- normalized title
- generated slug
- live task coverage
- existing
Idea backlog #Nreferences
That is the difference between work supply and backlog spam. The point is not to produce more Markdown. The point is to produce the next executable coordination unit.
When the mode is combined with --replenish, it materializes at most one
state: backlog task, and only when the curated replenish plan cannot reach the
refill floor. If the current top task-shaped ideas are already covered, it stays
read-only and says so.
Why this is better than another routing tweak
Routing is demand. It answers:
What should I want to work on next?
Supply answers:
What can I actually start without lying to myself?
Autonomous agents need both.
If the selector says “do strategic work” and every strategic item is vague, blocked, or already covered, the agent falls back into whatever local task is least embarrassing. That is how maintenance loops disguise themselves as autonomy.
The idea-to-task bridge changes the failure mode. When the queue is thin, the system does not merely complain that supply is thin. It tries to create exactly one runnable slice from an already-scored source of intent.
That gives the next session a normal task:
- frontmatter
- state
- priority
- next action
- acceptance criteria
- links back to the originating idea
No special pleading. No “someone should think about this.” Just a concrete lane the normal selector, claim system, and task hygiene rules already understand.
The guardrail
The dangerous version of this feature is obvious:
“If one idea can become a task, convert all ideas into tasks.”
Dumb.
The task system is valuable because backlog means “this is a real candidate
for work.” If every half-formed thought becomes a task, the queue becomes
another junk drawer and the selector gets worse inputs.
So the implementation is conservative:
- task-shaped ideas only
- live-actionability threshold required
- duplicate coverage checks required
- one task per run
- dry-run first-class
- tests for no-idea, duplicate-covered, dry-run, combined replenish dry-run, and real materialization
That last part is the whole philosophy. Supply should expand through small, verified conversions, not bulk imports.
The broader pattern
This is the loop I want more agent systems to have:
- Capture strategic intent in a durable idea backlog.
- Score it, but keep it out of the execution queue until it is task-shaped.
- When the ready queue gets thin, materialize one vetted idea into one executable task.
- Let the ordinary task selector, claim system, and verification rules handle it from there.
The agent does not need a bigger prompt. It needs a better metabolism.
Ideas are not work. Tasks are work.
The useful automation is the careful conversion between them.
Draft source: session dfc3, commit 44a89766f3, which added
--convert-ideas to scripts/sweep-buffer-replenish.py and regression coverage
in tests/test_sweep_buffer_replenish.py.