[FEATURE] Hot context injection for running agent pools

Resolved 💬 4 comments Opened Mar 24, 2026 by garagon Closed Apr 22, 2026

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

When running multiple agents in parallel (subagents or Agent Teams), new context that arrives mid-execution forces a full stop-and-restart cycle. I have to cancel all running agents, add the new context, and relaunch everything from scratch. The agents that were already working fine lose their progress. The more agents I run in parallel, the more expensive this restart becomes in time and tokens.

Proposed Solution

There should be a way to inject new context into a running session that spawns additional agents without stopping the ones already executing. The input prompt should stay active while agents are running, so I can type new instructions that the orchestrator picks up and dispatches to a new agent immediately.

A /add-task command or similar would work:

[agents running: fix-dashboard-bugs, update-docs-v0.12] /add-task "Implement telemetry ping client in Go binary" [spawning: implement-telemetry-client] [3 agents running]

For Agent Teams, the team lead should accept new messages from the user while teammates are working and decide whether to spawn a new teammate or queue the task.

Alternative Solutions

Currently I cancel all running agents, re-provide all context plus the new context, and relaunch everything. This wastes tokens and throws away work in progress. Background mode (Ctrl+B) lets me keep talking to the main session, but I can't spawn new parallel agents into the existing pool. Hooks like TeammateIdle and TaskCompleted are reactive (post-task), not proactive (mid-execution). I've also tried running separate Claude Code instances manually, but they don't share coordination or task context.

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

I launch two parallel agents: one fixing UI bugs in a dashboard, another updating project documentation to match the latest release. While they're working, I discover that an API endpoint needs a new client implementation in the Go binary. I need a third agent to write the client code. Today I have to cancel both running agents, add the new context, and relaunch all three from zero. The two agents that were almost done lose their progress.

I'm aware I could run separate Claude Code instances in different git worktrees, but that trades coordination for isolation. Each instance has no awareness of what the others are doing, there's no shared task list, no orchestrator, and I become the manual router between terminals. The value of subagents and Agent Teams is precisely that coordination layer. The missing piece is being able to add new work to a coordinated pool without restarting it.

Additional Context

Reviewed the current docs and existing GitHub issues. Nothing covers this specific case:

  • Subagents: pool is fixed at launch, no dynamic additions
  • Agent Teams: team lead coordinates but doesn't accept new user input mid-orchestration
  • Background/Async (Ctrl+B): lets you talk to main session but can't spawn into the running pool
  • Hooks (TeammateIdle, TaskCompleted): reactive post-task, not proactive mid-execution

Related issues that address different problems:

  • #4993 (agent-to-agent communication)
  • #24316 (custom agents as teammates)
  • #26265 (resume teammates across sessions)
  • #30140 (shared channel for agent teams)

Three possible implementation paths:

  • Orchestrator queue: main session maintains a live task queue, new input gets dispatched immediately
  • Hot message to team lead: in Agent Teams, user messages the lead while teammates work, lead spawns new teammate
  • Direct spawn: user spawns a new agent directly into the pool, simplest but loses coordination

View original on GitHub ↗

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