Super Mode and Session Memory Design in Multi-Agent Architectures

    This article explains why multi-agent systems need a coordinating layer above task executors, and how to design session memory around it. It covers the tradeoff between session isolation and context continuity, the role of a Super-agent, thread-based message routing, three layers of long-term memory, and a practical design checklist for teams building AI coding or automated operations capabilities.

    1. The Starting Problem: Parallel Gains and Context Costs from Session Splitting

    In multi-agent systems, a recurring engineering tension is that a session is both an isolation boundary and a context boundary. Putting different tasks in different sessions lets them truly run in parallel, and logs, user instructions, and execution results no longer contaminate one another. The cost is equally clear: as soon as two tasks touch the same decision, or the user adds a sentence from another entry point, something has to route that message to the right session. In practice, that “something” is often the developer, with several windows open at once.

    A typical case: a developer asks in a chat group for code changes following plan A, then switches to plan B in a comment on the pull request (PR) after the PR is created. A human immediately sees this as a revision of the decision just made. A system has to do three things first: match the original request in the group chat to the PR in front of it; recognize that this is a decision change rather than a new requirement; and deliver the new plan to the executor already working on the coding task. If the two messages land in two sessions that cannot see each other, the developer has to fill in the missing context alone.

    This yields a basic tradeoff: the finer the session split, the higher the parallelism and the harder it is to pick up the original context. Put every message in a single session and the agent can indeed watch a decision form and get overturned, but code logs, user instructions, and execution results are mixed together, so tasks can only queue. Give each task its own session and work can proceed in parallel, but cross-session message delivery becomes the new bottleneck.

    2. Why “Super”: Adding a Coordinator on Top

    In English, superscript sits above the line and subscript below it. Mapped onto agent architecture, a Sub-agent adds a layer of executors beneath the main agent, while a Super-agent adds a layer of coordinators above the agents that already do the work. The point of the name is not “more powerful” but “higher up”: it does not produce code directly. It receives messages, dispatches tasks, maintains relationships between tasks, and coordinates across multiple lines of work.

    This layering is essentially a decoupling of two responsibilities:

    • Interaction layer (the upper coordinator): faces user entry points, receives requirements, creates work items, and handles task decomposition and cross-task coordination.
    • Execution layer (the lower executors): each works in its own session and its own working directory, keeping the context required to finish its task.

    A complete flow looks like this: an authorized user raises a requirement, the system creates a work item, executes it in an isolated session and directory, and returns to the original conversation to deliver the result, for example by submitting a code change request.

    3. Message Routing: From Per-Message Forwarding to Thread Subscription

    If the upper coordinator has to read and forward every comment, the time saved by parallel execution may be consumed by waiting for messages. The common approach is therefore to organize messages under the same change request or the same chat topic into a thread:

    1. The upper coordinator dispatches the first message.
    2. The executor picks up the task and subscribes to that thread.
    3. New messages under that thread are then delivered directly to the subscribed executor.
    4. The upper coordinator only handles new tasks and matters that genuinely require cross-task coordination.

    Illustrative routing logic (pseudocode):

    1. def on_message(msg):
    2. thread = msg.thread # same PR or same chat topic
    3. if thread.owner is None:
    4. worker = router.assign(msg) # new task: dispatched by the upper layer
    5. thread.owner = worker
    6. worker.subscribe(thread)
    7. else:
    8. thread.owner.deliver(msg) # already owned: deliver directly

    The benefit is clear: routing overhead drops from one decision per message to one decision per thread, and executors no longer have to check context with the upper layer repeatedly.

    4. The Real Difficulty: Long-Range Memory Across Sessions

    Adding a sentence to the same change request is manageable, since a thread can claim it. But if the change has already been merged and a week later the user says in a new session “go with the plan we settled on last time,” the system has to answer three questions: which project, which discussion, and which plan was ultimately chosen.

    The industry has not reached consensus on how to implement long-range memory, which is one important motivation for the two-layer architecture: the upper layer maintains a graph of relationships between tasks, while the lower layer keeps the context each needs to execute. Which decisions are worth retaining after a session ends, and when to recall them next time, still belong to the problem of cross-session long-range memory. Most multi-agent frameworks today do not build this in, but the direction is fairly clear.

    In engineering, memory is usually split into three types, each carried by a different general-purpose cloud capability:

    • Structured memory: itemized storage of tasks, decisions, and conclusions, suited to a database or tabular storage.
    • Semantic memory: vector representations of the discussion process, suited to vector retrieval for similarity recall.
    • Process memory: execution traces and artifact indexes, suited to object storage plus logging services, with monitoring and alerting to track anomalies.

    The key point is that memory is not about storing more but recalling accurately: on write, record the time of the decision, its scope of applicability, and what superseded it; on read, include project and task identifiers as filter conditions. Otherwise long-range memory degrades into a source of noise.

    5. An Actionable Design Checklist

    • Define the layering boundary: the upper layer only dispatches and coordinates and does not touch execution details; the lower layer has no global view and only claims threads.
    • Use the thread as the routing key: use the change request number or topic identifier as the ownership basis instead of forwarding message by message.
    • Isolate working directories: give each work item its own directory to reduce the risk of artifacts overwriting one another.
    • Make decisions explicit: record “plan A changed to plan B” as a decision change rather than an ordinary message.
    • Layer memory and define a recall strategy: store structured, semantic, and process memory separately, and force filtering by project and task dimensions on recall.
    • Observability: set monitoring and alerting for dispatch latency, thread delivery failures, and task queue length.

    6. Conclusion

    Adding a layer on top in a multi-agent system is not about increasing complexity. It gives parallelism and context, two things that pull against each other, a place of their own: the upper layer trades a task relationship graph for coordination efficiency, the lower layer trades isolated sessions for execution isolation, thread subscription handles everyday message delivery, and cross-session long-range memory determines whether the architecture stays coherent over time. For teams building AI coding or automated operations capabilities, the lowest-risk path is to make the layering boundary and thread routing solid first, then fill in the memory layer step by step. On general-purpose cloud infrastructure, category capabilities such as container platforms, message queues, object storage, and log monitoring are already enough to support this architecture in production.