claude-code - 💡(How to fix) Fix [BUG] In-process teammates lack extended thinking — capability gap with tmux teammates and team lead [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54827Fetched 2026-04-30 06:34:50
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Root Cause

The status quo — silent backend selection that determines whether a teammate is a peer or a subagent-in-disguise — is the worst case, because callers can't tell which they got without inspecting the JSONL.

Code Example

TeamCreate(team_name="thinking-test")
Agent(
  name="worker",
  team_name="thinking-test",
  subagent_type="general-purpose",
  prompt="Reason carefully about a non-trivial question — say, why is the sky red at sunset specifically."
)

---

import json
n_thinking = n_assistant = 0
with open(JSONL) as f:
    for line in f:
        d = json.loads(line)
        msg = d.get('message', {})
        content = msg.get('content', [])
        if isinstance(content, list):
            for block in content:
                if isinstance(block, dict):
                    if block.get('type') == 'thinking':
                        n_thinking += 1
                    if block.get('type') == 'text' and msg.get('role') == 'assistant':
                        n_assistant += 1
print(f'thinking: {n_thinking} / assistant text: {n_assistant}')
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code (2.1.119)

What's Wrong?

When a teammate is spawned via Agent(team_name=...) and routed to the in-process backend (the default in headless / non-tmux contexts), the teammate runs without extended thinking enabled at the API level — just like a subagent.

Tmux-backed teammates do get thinking. So the same Agent(team_name=...) call produces silently different capability sets depending on which backend gets selected, with no API surface for the caller to ensure they get a full peer.

This is the same architectural pattern as #31977 (in-process teammates also lack the Agent tool). And it's adjacent to #14321 (subagents broadly can't get extended thinking). The new finding: in-process teammates fall on the subagent side of that line, despite being spawned with team_name.

What Should Happen?

A teammate should be a teammate. A team is a coordination construct, not a hierarchy — there's no good architectural reason for the team lead to have extended thinking and the Agent tool while in-process teammates don't. They share the lead's process; they should share its capabilities.

Concretely, one of:

  • (a) In-process teammates get full team-member capabilities (thinking, Agent tool) at parity with the tmux backend, OR
  • (b) The two backends are unified so "teammate" means one thing regardless of how it's wired up.

The status quo — silent backend selection that determines whether a teammate is a peer or a subagent-in-disguise — is the worst case, because callers can't tell which they got without inspecting the JSONL.

Steps to Reproduce

  1. Spawn a teammate in-process (default in headless contexts):
TeamCreate(team_name="thinking-test")
Agent(
  name="worker",
  team_name="thinking-test",
  subagent_type="general-purpose",
  prompt="Reason carefully about a non-trivial question — say, why is the sky red at sunset specifically."
)
  1. Locate the resulting JSONL: ~/.claude/projects/<project>/<team-lead-session-id>/subagents/agent-XXX.jsonl (the agent-XXX.meta.json at the same path identifies which one is yours via agentType).

  2. Count thinking blocks vs assistant text blocks:

import json
n_thinking = n_assistant = 0
with open(JSONL) as f:
    for line in f:
        d = json.loads(line)
        msg = d.get('message', {})
        content = msg.get('content', [])
        if isinstance(content, list):
            for block in content:
                if isinstance(block, dict):
                    if block.get('type') == 'thinking':
                        n_thinking += 1
                    if block.get('type') == 'text' and msg.get('role') == 'assistant':
                        n_assistant += 1
print(f'thinking: {n_thinking} / assistant text: {n_assistant}')
  1. Result: 0 thinking blocks across all assistant turns from the in-process teammate.

  2. Run the same script on the team lead's session JSONL (~/.claude/projects/<project>/<lead-session-id>.jsonl) — thinking blocks are present.

Concrete data point from a real session

Same project, same Opus 4.7 model, same workday:

RoleThinking blocksAssistant text blocksNotes
Team lead (interactive)11274~1.5 thinks per turn
In-process teammate (Agent + team_name, ran ~3 hours doing real work — debugging CUDA mismatches, setting up envs, submitting SLURM jobs, writing reports)096No thinking despite handling non-trivial tasks

The teammate handled substantial work (environment debugging, infra setup, report writing) without thinking. Not destructive, but meaningfully degraded — the bug is most painful precisely when you delegate substantial work, which is the natural use case for teammates.

Related Issues

  • #14321 — extended thinking not available for subagents broadly. In-process teammates effectively fall under this constraint despite being spawned as teammates.
  • #31977 — in-process team agents lack the Agent tool. Same architectural pattern: in-process teammates are missing teammate features that tmux teammates have.

The pair of #31977 + this issue establishes the broader pattern: in-process teammates are silently degraded relative to tmux teammates. The fix space probably wants to address them together, since the underlying architectural decision (in-process = subagent-in-disguise) drives both bugs.

Environment

  • Claude Code: 2.1.119
  • Platform: Linux (headless / SSH session)
  • Backend: in-process (default, not explicitly selected)

extent analysis

TL;DR

The issue can be addressed by ensuring in-process teammates have the same capabilities as tmux teammates, possibly by unifying the two backends or granting full team-member capabilities to in-process teammates.

Guidance

  • Investigate the differences in capability sets between in-process and tmux teammates to identify the root cause of the discrepancy.
  • Consider unifying the two backends to ensure "teammate" means the same regardless of how it's wired up.
  • Review related issues #14321 and #31977 to understand the broader pattern of in-process teammates being silently degraded relative to tmux teammates.
  • Test the fix by spawning a teammate in-process and verifying the presence of thinking blocks in the resulting JSONL.

Example

# Example code to verify the presence of thinking blocks
import json
n_thinking = 0
with open(JSONL) as f:
    for line in f:
        d = json.loads(line)
        msg = d.get('message', {})
        content = msg.get('content', [])
        if isinstance(content, list):
            for block in content:
                if isinstance(block, dict):
                    if block.get('type') == 'thinking':
                        n_thinking += 1
print(f'thinking: {n_thinking}')

Notes

The fix may require changes to the underlying architecture of the Claude Code system, specifically how in-process teammates are handled. It's essential to consider the broader implications of any changes to ensure consistency across different use cases.

Recommendation

Apply a workaround to grant full team-member capabilities to in-process teammates, as this is the most direct way to address the issue. This may involve modifying the Agent function or the underlying backend logic to ensure parity with tmux teammates.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] In-process teammates lack extended thinking — capability gap with tmux teammates and team lead [1 comments, 2 participants]