TeamCreate records wrong leadSessionId in config.json
Resolved 💬 2 comments Opened Apr 9, 2026 by cbockenstette-commits Closed May 23, 2026
Bug
The leadSessionId field written to ~/.claude/teams/<team>/config.json does not match the calling session's actual UUID. This makes cross-session team lookup unreliable.
Steps to Reproduce
- Confirm current session UUID (e.g., via
~/.claude/sessions/<pid>.json→"sessionId": "44a5bd90-...") - Call
TeamCreate(team_name: "my-team", description: "test") - Read
~/.claude/teams/<assigned-name>/config.json - Observe:
"leadSessionId": "1ecd8655-..."— different from the actual session UUID
Expected Behavior
leadSessionId should match the session UUID of the caller.
Actual Behavior
leadSessionId is a different UUID (possibly a parent session, pre-compaction UUID, or stale cache value).
Impact
- Cross-session team lookup (filter
config.jsonbyleadSessionId == $CLAUDE_SESSION_ID) returns wrong results - Any team registry design that relies on session attribution is broken
Environment
- Claude Code CLI
- Observed: 2026-04-08
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗