[BUG] --resume sessions register the agent-team hub under a stale placeholder session id — teammate replies are consumed but never delivered
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Summary
In a session started with claude --resume, subagent/teammate messages sent back to the
parent (SendMessage → team-lead) report success: true, are removed from the team
inbox file, but never appear in the parent conversation. Named agents then park idle
forever, so from the user's perspective "subagents never come back". Sessions started
fresh are unaffected.
Observed on 2.1.250.
Environment
- Claude Code 2.1.250 (Linux x86-64, AWS/Coder devbox)
- Bedrock backend (
CLAUDE_CODE_USE_BEDROCK=1) CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1- Main model Opus 5 / Fable 5; agents on
global.anthropic.claude-opus-5[1m]
What Should Happen?
--resume should handle subagents
Error Messages/Logs
Steps to Reproduce
- Have an existing session; exit it.
claude --resumeand pick that session.- Spawn a named agent via the Agent tool with a trivial prompt: write a file, then
SendMessage the same content to team-lead.
- Observe: the file is written and the agent's
SendMessageresult is
{"success":true,"message":"Message sent to team-lead's inbox","msg_id":"..."}.
- The message never arrives in the parent session — no attachment, no turn, nothing,
even after several minutes and subsequent turns. The agent stays alive, idle.
What actually happens (evidence chain)
Observed 2026-08-28. Session ids below are redacted to two placeholders:RRRRRRRR-… = the resumed conversation id (the transcript that exists on disk), andPPPPPPPP-… = the throwaway id generated at process startup and discarded by--resume. The parent session was resumed at 12:18:52 local:
- One second after process launch (12:18:53, before resume finished restoring the old
conversation), the team hub was created as ~/.claude/teams/session-PPPPPPPP/ with
"leadSessionId": "PPPPPPPP-…". No transcript PPPPPPPP*.jsonl exists anywhere
— that id is the startup placeholder.
- The live transcript is
RRRRRRRR-….jsonl, and spawned agents receive
--parent-session-id RRRRRRRR-… — but --team-name session-PPPPPPPP.
- Task outputs also split identity: symlinks land in
/tmp/claude-<uid>/<project>/PPPPPPPP-…/tasks/*.output →
~/.claude/projects/<project>/RRRRRRRR-…/subagents/agent-*.jsonl.
- The probe agent's transcript shows
SendMessage(to: "team-lead")at 11:20:16Z
returning success: true with a msg_id (UUID redacted; available on request).
~/.claude/teams/session-PPPPPPPP/inboxes/team-lead.jsonwas emptied (mtime
11:22:31Z, content []) while the parent was mid-turn — so the watcher consumed it.
- That msg_id appears zero times in the parent transcript (
grepover
RRRRRRRR-….jsonl). The message was consumed and silently dropped.
Control: an identical probe from a fresh session on the same machine/version
round-tripped in 1.3 s, and that session's team config has leadSessionId matching its
real transcript. A second orphaned team dir from another --resume two minutes earlier
(different placeholder id, no matching transcript) shows the same failure independently.
Root-cause analysis (from the bundled source)
Team creation snapshots the session id at creation time:
teamName = existingTeamName ?? `session-${sessionId().slice(0,8)}`
config = { name: teamName, leadSessionId: sessionId(), members: [...] }
// plus an alias mapping sessionId() → teamName
The problem is one of ordering: the team is registered at process startup, before--resume replaces the placeholder session id with the resumed conversation id (the
team dir was created one second after process launch, before the resume picker could
complete). Nothing re-stamps leadSessionId or adds an alias for the post-resume id,
so inbound messages keyed to the live session id can't be matched to the team and are
dropped after consumption.
Suggested fix: create the team lazily after the session id is final, or on --resume
re-stamp leadSessionId and add the session-id → team alias for the new id.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.250 (Claude Code)
Platform
AWS Bedrock
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗