Skip to content

Agent-declared sessions — address a DOMShell lane by id, for multi-chat isolation and handoff #34

@apireno

Description

@apireno

Problem

DOMShell gives each MCP connection its own isolated session (#33). But MCP exposes no identity below the connection — clients like Claude Desktop multiplex every chat over a single connection, so two chats land in the same lane and share it.

Proposed direction

Add an optional group_id parameter to domshell_execute:

  • omitted → the connection's current lane (stable — never spawns a new one)
  • "new" → create a fresh lane; the command runs in it; the new id is returned
  • "<id>" → run in that lane

Every response echoes the group_id it ran in, so an agent always knows its lane. Two chats on one connection each pass their own id → isolated. And one agent can hand a session to another just by passing along the id.

The single-tool interface is preserved — one parameter, no new tools.

Related

Builds on #33 (multi-session DOMShell). #33 isolates per MCP connection; this isolates per agent-declared lane within a connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions