[BUG] Invoking a sub-agent does not return agentId
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?
Per https://docs.claude.com/en/docs/claude-code/sub-agents#resumable-subagents when we invoke a sub-agent we are supposed to get back the agentId of the sub-agent.
What Should Happen?
agentId should be returned
Error Messages/Logs
Steps to Reproduce
Ask claude to invoke a command using a sub-agent, such as the command mentioned at https://docs.claude.com/en/docs/claude-code/sub-agents#resumable-subagents
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.31
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
Per https://docs.claude.com/en/docs/claude-code/sub-agents#resumable-subagents the system is supposed to return the agentId but this value is not visible by hitting CTRL+O nor is it returned in function_results from the Task tool.
Expected behavior: Return agentId as part of function_results so claude will be able to programmatically resume execution of the sub-agent for future operations.
3 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Closing as a duplicate
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.