Plane-2 builder calls Claude single-shot (max_turns=1) to generate a code diff — every task fails at the build phase #60
Labels
No labels
app
bug
ci
compliance
content
dependencies
docs
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
infra
invalid
javascript
needs-triage
python
question
tests
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: adam/orchestrator#60
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The Plane-2 builder node invokes Claude single-shot (
max_turns=1, no tools) to generate a unified code diff. Diff generation is an inherently agentic task (it needs multiple turns and file tools), so the call immediately hitsReached maximum number of turns (1)and the task fails at thebuildphase. This blocks every task from completing end-to-end (plan → review → build → verify → PR).Discovered live on the R720 (
sh-secrev) during a plan-review-gate smoke test on 2026-06-24.Root cause
agent-team/agent_team/nodes/builders.py→default_diff_builder(~line 188):claude_invoke(viainvoker.subscription_invoker) defaults to_DEFAULT_MAX_TURNS = 1andallowed_tools=[](the deliberate single-shot config for reasoning→JSON nodes like the clarifier/planner). For the builder that default is wrong: producing a real code diff needs many turns and, almost certainly, file/edit tools — it cannot complete in one tool-less turn.Evidence (live)
6df154edaafa47aeb93782997d5cd27areached an approved plan (planner + 2 review rounds) and advanced tobuild, then:status=failed,phase=build,failure_reason="…Reached maximum number of turns".active,NRestarts=0) and only that one task failed.Impact
❌ FAILEDtask atphase=buildwith the max-turns message.Why this is its own bug (vs the planner flake)
This is the same class of "single-shot config on a call that needs more" as the planner issue fixed in PR #58, but in a different node and with a different fix: the planner just needed a little turn headroom (
max_turns=4, tools still off, because it only emits JSON). The builder must actually write code, so it needs a genuinely agentic config — a highermax_turnsand an appropriateallowed_toolsset (file read/edit) — not merelymax_turns=4. This is a P3 build-node design decision.Proposed fix
default_diff_builderan agentic invoker config: a sufficientmax_turnsand anallowed_toolsallowlist for the diff-generation strategy (or route it through the DeepSeek-edit path the builder docstring references, with appropriate turns/tools).max_turns/allowed_toolsto match.max_turnspassthrough test added in PR #58), so this can't silently regress to the default.Repro
On the R720 (post-#58, with the build path wired):
/new-task <anything>in#agent-team, answer the clarifier, let the plan get approved → the task fails atbuildwithReached maximum number of turns (1).Related
❌ FAILEDlifecycle milestone did not post to Slack for this build-stage failure — worth verifying the_post_resume_followupsFAILED path covers failures that originate deep in the build subgraph.