Skip to content

Quest: Observe and interact with multiple coding-agent sessions #785

Description

@taras

Story

As a person coordinating several coding agents, I want one XMD interface to preserve, display, and interact with their sessions, so I can move between roles and issues without losing conversation state or depending on each provider's native UI.

An executable document declares a provider-neutral grid. Each pane can launch an Agent session, follow an independently owned session, or display the retained REPL. Tmux presents that grid first; an XMD-owned provider can present the same document later. Interaction always uses the authority belonging to the session rather than terminal-state inference.

<Grid columns={2}>
  <Pane title="Architect · #784">
    <Agent name="codex">
      <Session.Tail session="existing-session-id" />
    </Agent>
  </Pane>
  <Pane title="Implementor · #784">
    <Agent name="claude">
      <Session.Launch session="implementor">...</Session.Launch>
    </Agent>
  </Pane>
</Grid>

Current gap

The unmerged #717 stack proves concurrent interactive panes and tmux lifecycle, but its public syntax identifies every pane as a terminal. XMD can interact reliably through ACP, yet those messages do not become visible in an already-open provider-native TUI.

Issue #774 tested whether session-file observation plus terminal convergence could bridge that gap without provider cooperation. Passive observation succeeded; generic tmux input remained subject to an uncloseable race between the final provider-file sample and terminal paste. The safe result is VIEW_ONLY: observe provider sessions from their files, but never use that observation to authorize input.

Product contract

Grid and pane are the durable presentation vocabulary. Tmux and a first-party XMD multiplexer implement the same run-only provider contract. A physical terminal remains a capability a pane may require, not the identity of every cell.

<Session.Launch> and <Session.Tail> are interchangeable as pane session sources and differ in authority. Launch owns the interaction and lifecycle its Agent provider grants. Tail observes an independently owned native session and can only stop observing it.

A retained XMD REPL owns interactive ACP sessions and their queues. Every viewer projects the same immutable action store and ACP event stream; a viewer does not open another ACP client. Provider session files supply read-only history and live observation, never prompt, permission, completion, cancellation, identity-allocation, or teardown authority.

Tmux remains useful for document-configured layouts and titles, including role and current issue. It is an xmd run provider, not Workflow behavior. No child in this Quest adds terminal presentation, live provider-file observation, or REPL interaction to Workflow.

Dependency-ordered child map

  1. Test black-box REPL messaging through xmd run terminal panes #774Test black-box REPL messaging through xmd run terminal panes
  2. Make executable document grids use <Grid> and <Pane> #781Make executable document grids use <Grid> and <Pane>
  3. View coding-agent sessions with <Session.Tail> and xmd tail #782View coding-agent sessions with <Session.Tail> and xmd tail
  4. Interact with multiple Agent sessions through a retained XMD REPL #783Interact with multiple Agent sessions through a retained XMD REPL
  5. Present Agent session grids without an external multiplexer #784Present Agent session grids without an external multiplexer
#774 ──> #782 ──> #783 ──> #784
             ▲                 ▲
#717 ──> #781 ─────────────────┘

Completion

The Quest is complete when:

  • <Grid> and <Pane> are the only shipped grid syntax and the old unshipped Terminal names and packages are absent;
  • <Session.Tail> and xmd tail open and follow exact supported Claude and Codex sessions read-only;
  • one retained REPL controls multiple ACP sessions without duplicate prompts, competing clients, or identity substitution;
  • tmux and the XMD-owned provider present the same authored grid contract;
  • role and issue titles remain document data;
  • every interaction follows ACP or an explicitly owned native PTY, while provider files and terminal convergence remain observation only; and
  • focused positive and negative evidence covers identity, concurrent sessions, restart, uncertain work, wrong-cell input, cancellation, and complete provider teardown.

Relationships and boundaries

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

    enhancementNew feature or requestquestCoordinating story with dependency-ordered sub-issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions