Feature: interactive subagent push/pop stack

Resolved 💬 3 comments Opened Apr 9, 2026 by tsuberim Closed Apr 13, 2026

Feature Request

Add the ability to enter a subagent context interactively and pop back to the parent context when done — a push/pop agent stack.

Current behavior

The Agent tool spawns a subagent that runs autonomously to completion and returns a result. SendMessage allows resuming a named agent, but both are async/fire-and-wait — there's no way to interactively converse within a subagent and then return to the parent session with accumulated state.

Desired behavior

Something like:

/enter-subagent "focus on the auth module"
... interactive prompts scoped to that context ...
/pop  →  returns to parent session, optionally surfacing a summary

Semantics:

  • Parent session is paused/suspended while the subagent is active
  • Subagent has its own focused context (e.g. scoped files, tools, instructions)
  • On exit, accumulated state/summary can be passed back to the parent
  • Nestable (push multiple levels, pop one at a time)

Use case

  • Deep-dive into a subsystem without polluting the main context window
  • Isolate a research task, then return with findings
  • Focused refactoring session inside a larger feature implementation

Workaround today

Open a second Claude Code terminal session manually and summarize findings back to the main session.

---
Filed from Claude Code CLI

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗