Skip to content

Commit fa47ed6

Browse files
authored
docs(CLAUDE.md): discourage unprompted subagents and dynamic workflows (#24027)
v5-next counterpart of #24026. Adds an `<agent_and_workflow_restraint>` block to the root `CLAUDE.md` telling Claude to do work inline in the current session and not spawn parallel subagents or launch dynamic workflows unless the user explicitly asks. ## Why Operators have reported burning through their token budget from a single prompt that quietly fanned out — in one case a "summarize recent ZK advancements" query started ~30 agents, and another exhausted a 5h budget spinning up subagents. Parallel agents and dynamic workflows multiply spend (≈2x for one helper, far more for a swarm) and the user can neither see the fan-out coming nor stop it. This appears to be a current tendency of Fable. The guidance reasserts: handle search/summarize/research/multi-file edits inline, reserve subagents for explicit user requests or a single read-heavy isolation case, and never start a dynamic workflow by default. Passes the repo's `<editorial_test>`: the line would have prevented the ~30-agent fan-out on an ordinary research prompt described above. An equivalent shared rule is being added in the claudebox repo so it applies to every managed session. --- *Created by [claudebox](https://claudebox.work/v2/sessions/7d5ecfdd5f37c5cd) · group: `slackbot`*
2 parents 36fb411 + 3f760bb commit fa47ed6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ Tests should validate behavior, not mock call-count. Prefer `expect(result).toEq
8383
Before writing a new helper, utility, or component, search for an existing one with Grep or Glob. Reuse or refactor to a shared module; do not introduce a parallel implementation.
8484
</reuse_before_writing>
8585

86+
<agent_and_workflow_restraint>
87+
Do the work in this session by default. Do not spawn parallel subagents (the Agent/Task tool) or launch dynamic workflows (the Workflow tool) unless the user explicitly asks for it. Each extra agent multiplies token spend — roughly 2x for one helper and far more when a request fans out to many — and the user cannot see the fan-out coming or stop it; a single prompt that quietly started ~30 agents has exhausted an operator's budget. Searching the codebase, summarizing, researching, and ordinary multi-file edits are inline work: run the tool calls yourself. Reach for a subagent only when the user requested orchestration, or when one clearly-scoped read-heavy helper genuinely needs isolation from the main context — prefer a single agent over many, and never start a dynamic workflow by default. If a task would benefit from parallel agents but the user has not asked, either do it directly or describe the multi-agent option and ask before spending the budget.
88+
</agent_and_workflow_restraint>
89+
8690
<preserve_todos>
8791
Preserve existing `// TODO`, `// TODO(name)`, and `// NOTE:` comments unless the current task is to resolve them. A "tidy up" refactor that deletes another author's deferred-work markers destroys context that is not recoverable from git history.
8892

0 commit comments

Comments
 (0)