[FEATURE] reuse same CLI for multiple agents
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I often need to spawn multiple claude code, especially when using the claude agent sdk on a server.
This requires spawning multiple claude processes, each one using at least 200mb RAM because of the js runtime.
Claude code is mostly io bound, not cpu bound, so it would make sense to be able to "attach" to a running claude and merely ask it to run another "loop" in a thread.
Proposed Solution
spawning only one claude per sdk import, then reuse the same when creating multiple agents.
Alternative Solutions
No response
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
No response
Additional Context
No response
Found 2 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/12173
- https://github.com/anthropics/claude-code/issues/12940
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
#12940 is not related
#12173 addresses the same underlying issue but with a different fix
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
+1
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.