Skip to content

[ZCode core] Feature request: interactive nested sessions — a session tree under the main conversation with automatic report-back #177

Open

Description

@foxbye

Summary

Note: filing here because the main zai-org/ZCode repo has both Issues and Discussions disabled; following the precedent of #123 ([ZCode core] Feature request). Please move to the appropriate tracker if one exists.

Requesting interactive nested sessions for the ZCode desktop app: sessions created from a main conversation (by the user or by the agent) that appear as a tree under the main session in the left sidebar, remain fully interactive, and report their results back to the main conversation automatically when done.

Why regular subagents are not enough

ZCode's current subagents (Agent tool) are non-interactive fire-and-forget workers: the user cannot enter them mid-task to adjust direction, and follow-ups go through the main session via SendMessage. Dynamic workflows are also non-interactive orchestration.

That covers automated work well, but a large class of real tasks is long-running AND direction-shifting: multi-step projects where the right move depends on what earlier steps produced, and where the user wants to step into a branch, talk to it, and continue. Today the only options are "wait for the result and re-run" or keep everything in one main conversation (context bloat, no parallelism).

Proposed behavior

Based on hands-on use of a similar recently-shipped mechanism in Claude Code Desktop (see Reference), which works very well in practice:

  1. Dual creation entries — the user creates a nested session from the main conversation, and the agent can also create one on its own when it decides a work stream deserves its own session.
  2. Session tree in the sidebar — nested sessions appear as children of the main session (multiple nested sessions per main session form a tree), so parallel work streams stay organized and visible at a glance.
  3. Fully interactive — the user can enter any nested session at any time, chat with it, adjust requirements mid-flight. Interaction is optional: unattended parallel execution works just as well, and that is exactly what makes the model valuable for complex multi-step tasks.
  4. Automatic report-back — when a nested session finishes, its result is reported back to the main conversation automatically (summary + changed files), so the main session can continue orchestration without polling.
  5. Persistence — completed nested sessions do not disappear; they stay in the tree for review and can be resumed.
  6. Composability — a nested session can itself spawn subagents, so deep delegation still works inside a branch.

Use cases

  • Multi-step complex workstreams fanned out in parallel (per-module implementation, per-phase review, per-topic research), with the main session acting as orchestrator.
  • Long tasks where the user wants the option to step in and interact, without breaking the unattended flow for the branches they don't touch.
  • Keeping context lean in the main conversation: each stream's process noise stays inside its own session; only the report-back lands in the orchestrator.

Reference

Claude Code Desktop recently shipped this exact shape: nested sessions that report results back to the main conversation, alongside a session sidebar showing active/finished/waiting agents and cross-session messaging (@session). Community reception has been strongly positive. ZCode already has the harder parts in place (tasks pane, subagent runtime, workflow orchestration); the interactive session-tree layer on top would close the gap.

Thanks for considering — happy to provide more detailed workflow examples if useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions