[FEATURE] Cross-project session handoff: spawn an autonomous session in another directory and read its results back

Open 💬 3 comments Opened Jun 4, 2026 by yuriyOtomakeit

Summary

Allow a top-level Claude Code session to programmatically start another autonomous session — ideally rooted in a different project directory (loading that directory's own CLAUDE.md, tools, and memory) — hand it a prompt, let it run to completion autonomously, and read its final result/artifacts back into the originating session. Essentially first-class agent-to-agent handoff across projects, comparable to what Codex now supports with cross-thread create/read/continue.

Motivation / use case

A multi-"department" setup: several separate repos/vaults, each with its own CLAUDE.md defining a distinct agent persona and rules (e.g. a coordinator plus domain-specialist agents). The natural workflow is: the coordinator finishes its part, hands a self-contained task to the relevant domain agent — which lives in another repo with its own CLAUDE.md / tools / memory — that agent runs autonomously, then reports results back to the coordinator. Today this requires a human to open the second session and paste the handoff by hand.

Current state / gaps

  • Subagents inherit the parent session's cwd and context; they can't load a different project's CLAUDE.md to take on that project's agent identity. Per-subagent cwd / additionalDirectories was requested in #31940 but closed as stale (NOT_PLANNED by the inactivity bot, which explicitly invited a fresh issue) — so this remains unaddressed.
  • Agent Teams is the closest primitive, but it is experimental / opt-in, hierarchical (a fixed lead + teammates) rather than symmetric peers, and organized around one shared task list — it models "many hands on one objective," not "hand a discrete job to a standing agent in another project and get a result back."
  • Headless claude -p shell-out to another cwd technically works, but it blocks the parent, has no clean result-readback contract, and isn't presented as a supported handoff mechanism.

Proposed capability (sketch)

  • A tool/API to spawn an autonomous session with: a target working directory (loads that dir's CLAUDE.md + settings), a prompt, and optional model / tool / permission scoping.
  • The spawned session runs autonomously to completion (or until blocked).
  • The originating session can poll/read the spawned session's status and final output (plus any artifact paths it reports), then continue from that result.
  • Symmetric — any session can hand off to any other — rather than necessarily lead/teammate hierarchical.

Notes

This would bring Claude Code to parity with Codex's cross-thread handoff, and is a natural extension of Agent Teams toward cross-project, symmetric, autonomous delegation. Refiling per the bot's invitation on #31940 and broadening scope from "per-subagent cwd" to "cross-project autonomous session handoff with readback."

View original on GitHub ↗

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