Agent teams: shutdown_approved shows paneId "[invalid id]" under cmux (pane id regex caps at 10 digits)

Open Beginner friendly
#112,605 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
cli

Research direction

Find the message display sanitizer that checks pane IDs against /^(%[0-9]{1,10}|<uuid>)$/; the issue does not name its file or a test. Read that validation and its nearby tests, then reproduce with a pane ID such as %8392977483769161943. Done when the shutdown_approved message preserves the longer numeric pane ID and the validation tests cover it.

Written by the indexing model from the issue text.

Description

area:agents bug has repro platform:macos

Running agent teams inside cmux (cmux claude-teams, which puts a tmux shim on PATH), every shutdown_approved message I get back from a teammate has the pane id replaced:

{"type":"shutdown_approved","requestId":"shutdown-...@s1","from":"s1","timestamp":"...","paneId":"[invalid id]","backendType":"tmux"}

The pane id is fine. cmux just hands out much longer pane ids than real tmux, e.g. %8392977483769161943 (19 digits). The message display sanitizer only accepts

/^(%[0-9]{1,10}|<uuid>)$/

so anything past 10 digits gets swapped for "[invalid id]".

As far as I can tell it's display only. Spawning reads pane ids as strings via -F "#{pane_id}", and I spawned 8 teammates and shut down 6 without problems; processes exited and panes closed. But it's confusing when you're debugging teams under cmux, because it looks like Claude Code lost track of the pane. That cost me some time chasing the wrong thing.

Possible fix: loosen the digit cap, e.g. %[0-9]{1,20} covers a full unsigned 64-bit id.

Repro:

  1. Start Claude Code with cmux claude-teams (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1)
  2. Spawn a named teammate
  3. Send it a shutdown_request
  4. The shutdown_approved message shows "paneId": "[invalid id]"

Versions: Claude Code 2.1.332, cmux 0.65.2 (build 113), macOS on Apple Silicon.

Related: #36926 (cmux as a teammateMode backend).

Dominant language
TypeScript
Stars
157k
Forks
25.1k
Avg merge
20h 25m
Merged PRs (30d)
4

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.