[Bug] Agent teammates stuck in indefinite plan-mode approval loops

Resolved 💬 3 comments Opened Feb 26, 2026 by ffxsam Closed Mar 26, 2026

Bug Description
What happened: (in Claude's words)

I (Claude) used the agent team feature (TeamCreate + Task tool with team_name) to coordinate 3
teammates on a cross-repo feature implementation. The UX Designer (read/write, no plan
mode) worked fine. But the Code Implementer (spawned with mode: "plan") entered a loop:

  1. Submits plan → I approve via plan_approval_response → goes idle
  2. Re-submits the same plan → I approve again → goes idle
  3. Repeat indefinitely — never exits plan mode, never writes code

I tried:

  • Approving multiple times
  • Sending direct messages telling it to start working
  • Shutting it down and re-spawning without mode: "plan" — it still entered plan mode and

looped

  • Spawning a third time with explicit instructions ("no planning needed, implement now") —

same loop

The Code Reviewer (spawned without plan mode) had a different issue: it completed its
initial review successfully, but when asked to re-review a fix, it went idle repeatedly and
never responded to messages.

Expected behavior:

  • After plan approval, the teammate should exit plan mode and begin execution
  • Re-spawning without mode: "plan" should not enter plan mode
  • Idle teammates should wake up and process messages when sent new work

Environment:

  • Claude Code CLI
  • Model: claude-opus-4-6
  • Teammates spawned via Task tool with team_name parameter
  • Subagent type: general-purpose

Impact:

The Code Implementer consumed ~3 spawns worth of tokens without producing any output. I
ended up implementing all tasks directly as the team lead, which took about 2 minutes. The
team orchestration overhead (spawning, messaging, waiting, debugging) added ~10 minutes of
wall time and significant token cost for zero value on the implementation side.

The UX Designer and Code Reviewer's initial pass did add value (clean UX plan, caught a
real bug), but those could have been simple Task subagents without the team infrastructure.

Suggestion:

The plan-mode exit flow for team agents seems broken. Once a plan is approved, the agent
should transition cleanly into execution mode. There may also be an issue where team
context forces plan mode regardless of the mode parameter passed during spawn.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.59
  • Feedback ID: 54a2b92b-d4f0-49ee-a9b5-c7f1fa748df6

Errors

[{"error":"RangeError: path should be a `path.relative()`d string, but got \"../v2-presentation/src/pages/embed/[id].astro\"\n    at AI7 (/$bunfs/root/claude:821:5386)\n    at em (/$bunfs/root/claude:821:5559)\n    at _test (/$bunfs/root/claude:821:6097)\n    at ignores (/$bunfs/root/claude:821:6610)\n    at <anonymous> (/$bunfs/root/claude:892:3948)\n    at filter (native:1:11)\n    at qXR (/$bunfs/root/claude:892:3770)\n    at td_ (/$bunfs/root/claude:892:3633)\n    at n_B (/$bunfs/root/claude:1891:15361)\n    at Ig7 (/$bunfs/root/claude:1892:2712)","timestamp":"2026-02-26T16:50:07.139Z"},{"error":"RangeError: path should be a `path.relative()`d string, but got \"../v2-presentation/src/layouts/Layout.astro\"\n    at AI7 (/$bunfs/root/claude:821:5386)\n    at em (/$bunfs/root/claude:821:5559)\n    at _test (/$bunfs/root/claude:821:6097)\n    at ignores (/$bunfs/root/claude:821:6610)\n    at <anonymous> (/$bunfs/root/claude:892:3948)\n    at filter (native:1:11)\n    at qXR (/$bunfs/root/claude:892:3770)\n    at td_ (/$bunfs/root/claude:892:3633)\n    at n_B (/$bunfs/root/claude:1891:15361)\n    at Ig7 (/$bunfs/root/claude:1892:2712)","timestamp":"2026-02-26T16:50:09.750Z"},{"error":"RangeError: path should be a `path.relative()`d string, but got \"../v2-microservices/src/lambda/rest/functions/get-oembed.ts\"\n    at AI7 (/$bunfs/root/claude:821:5386)\n    at em (/$bunfs/root/claude:821:5559)\n    at _test (/$bunfs/root/claude:821:6097)\n    at ignores (/$bunfs/root/claude:821:6610)\n    at <anonymous> (/$bunfs/root/claude:892:3948)\n    at filter (native:1:11)\n    at qXR (/$bunfs/root/claude:892:3770)\n    at td_ (/$bunfs/root/claude:892:3633)\n    at n_B (/$bunfs/root/claude:1891:15361)\n    at Ig7 (/$bunfs/root/claude:1892:2712)","timestamp":"2026-02-26T16:50:11.113Z"},{"error":"RangeError: path should be a `path.relative()`d string, but got \"../v2-microservices/infra/api/stacks/public.ts\"\n    at AI7 (/$bunfs/root/claude:821:5386)\n    at em (/$bunfs/root/claude:821:5559)\n    at _test (/$bunfs/root/claude:821:6097)\n    at ignores (/$bunfs/root/claude:821:6610)\n    at <anonymous> (/$bunfs/root/claude:892:3948)\n    at filter (native:1:11)\n    at qXR (/$bunfs/root/claude:892:3770)\n    at td_ (/$bunfs/root/claude:892:3633)\n    at n_B (/$bunfs/root/claude:1891:15361)\n    at Ig7 (/$bunfs/root/claude:1892:2712)","timestamp":"2026-02-26T16:50:11.114Z"},{"error":"RangeError: path should be a `path.relative()`d string, but got \"../v2-microservices/infra/api/stacks/api-v25.ts\"\n    at AI7 (/$bunfs/root/claude:821:5386)\n    at em (/$bunfs/root/claude:821:5559)\n    at _test (/$bunfs/root/claude:821:6097)\n    at ignores (/$bunfs/root/claude:821:6610)\n    at <anonymous> (/$bunfs/root/claude:892:3948)\n    at filter (native:1:11)\n    at qXR (/$bunfs/root/claude:892:3770)\n    at td_ (/$bunfs/root/claude:892:3633)\n    at n_B (/$bunfs/root/claude:1891:15361)\n    at Ig7 (/$bunfs/root/claude:1892:2712)","timestamp":"2026-02-26T16:50:11.115Z"},{"error":"RangeError: path should be a `path.relative()`d string, but got \"../v2-presentation/src/utils/fetch-presentation-reel.ts\"\n    at AI7 (/$bunfs/root/claude:821:5386)\n    at em (/$bunfs/root/claude:821:5559)\n    at _test (/$bunfs/root/claude:821:6097)\n    at ignores (/$bunfs/root/claude:821:6610)\n    at <anonymous> (/$bunfs/root/claude:892:3948)\n    at filter (native:1:11)\n    at qXR (/$bunfs/root/claude:892:3770)\n    at td_ (/$bunfs/root/claude:892:3633)\n    at n_B (/$bunfs/root/claude:1891:15361)\n    at Ig7 (/$bunfs/root/claude:1892:2712)","timestamp":"2026-02-26T16:50:11.687Z"},{"error":"RangeError: path should be a `path.relative()`d string, but got \"../v2-microservices/src/lambda/rest/functions/get-embed.ts\"\n    at AI7 (/$bunfs/root/claude:821:5386)\n    at em (/$bunfs/root/claude:821:5559)\n    at _test (/$bunfs/root/claude:821:6097)\n    at ignores (/$bunfs/root/claude:821:6610)\n    at <anonymous> (/$bunfs/root/claude:892:3948)\n    at filter (native:1:11)\n    at qXR (/$bunfs/root/claude:892:3770)\n    at td_ (/$bunfs/root/claude:892:3633)\n    at n_B (/$bunfs/root/claude:1891:15361)\n    at Ig7 (/$bunfs/root/claude:1892:2712)","timestamp":"2026-02-26T16:50:14.012Z"},{"error":"RangeError: path should be a `path.relative()`d st…

Note: Content was truncated.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗