Scheduling and Memory Architecture for Long-Running Multi-Agent Systems

    Single-session agents can edit code, draft plans, and summarize progress, but real work rarely unfolds in one linear conversation. This article describes a brand-neutral runtime: one router coordinating multiple executors, layered memory, and recoverable external state so goals stay continuous, efficient, proactive, and durable without stuffing every detail into an ever-open session.

    Single-session agents can already modify code, draft plans, and summarize progress. Real work rarely proceeds as one linear conversation. Tests are still running when a new requirement arrives, and a status request needs an immediate answer. Human attention can usually track only a few active sessions, while execution-side concurrency has almost no hard ceiling. The bottleneck is not whether the model is “smarter.” It is the lack of a runtime that takes over scheduling, memory, and continuity on a person’s behalf. What follows is a brand-neutral pattern: one router coordinating multiple executors, paired with recoverable long-lived state.

    Name the failure modes

    Common failures fall into four groups.

    First, context is trapped inside a session. The same topic is scattered across windows. People have to hunt through history, and later tasks never see earlier constraints.

    Second, concurrency has no owner. Several executors change the same material or the same logic at once, with no mutual exclusion, merge step, or conflict arbitration.

    Third, progress depends on a human nudge. Long-running work stops while it waits on an external result, and nobody owns timeouts, retries, or writing the state back.

    Fourth, being online is not the same as being reliable. After a process restart, a quota exhaustion, or a tool failure, the goal, the progress, and the unfinished steps disappear together.

    “Let agents manage agents” should not mean wrapping the system in a longer prompt. It means pulling human attention out of instruction-by-instruction control and keeping it for goal confirmation, risk approval, and acceptance of results.

    How the four capabilities land

    Continuity means memory and context stay connected, not that the entire history is stuffed into one inference call. Short-term context keeps only the facts the current step needs. Facts that cross sessions go into retrievable memory. Immutable constraints—goals, permissions, and deadlines—are stored separately so casual conversation does not dilute them.

    Efficiency comes from parallelism, not from stacking work serially. The routing layer splits tasks, orders dependencies, and merges results. Executors handle subtasks that do not block one another, such as retrieving material, running checks, or drafting a section. Parallelism is valid only when subtask boundaries are clear and inputs and outputs can be checked.

    Initiative means advancing on a plan within an authorization boundary, not unlimited autonomy. Typical triggers include scheduled checks, external events, completed dependencies, and failure retries. Proactive behavior must carry a budget: a maximum step count, a maximum degree of parallelism, the tool categories that may be called, and the points at which a human must confirm again.

    Durability means goals and progress can survive outside the process. The system should at least be able to answer: what the current goal is, which step has been reached, which artifacts have been submitted, who executes the next step, and which checkpoint to resume from after a failure. Durable does not mean unconstrained 24/7 execution. It means the work can be recovered after a fault and suspended when idle.

    One router, many executors

    The recommended control plane stays thin: one router decides, and multiple executors do the work. The router should not carry all of the detailed reasoning itself, or it becomes the same bloated single session again.

    The router receives goals and constraints; breaks a goal into a task graph with dependencies; selects executors by capability, load, and isolation needs; joins artifacts and judges whether acceptance criteria are met; and escalates to a person on conflict, privilege overrun, or budget exhaustion.

    An executor sees only the context required for its subtask; calls authorized tools; returns a structured result, evidence, and uncertainty; and does not rewrite the global goal on its own.

    A task description can stay neutral and serializable: task id, parent goal, input references, acceptance criteria, dependency list, timeout and retry limits, allowed tool scope, and current state—pending, running, waiting on an external result, pending merge, completed, or failed.

    The routing loop is straightforward. Pull tasks that are runnable and whose dependencies are satisfied. Dispatch them within the parallelism cap. Collect results. If acceptance fails, create a repair task instead of retrying without a bound. If state does not change for a long time, alert or suspend.

    This split answers the context curse of “one session owns everything.” The global session no longer carries every detail. It keeps the goal, the decision record, and references to artifacts. Long documents, logs, and intermediate drafts go into object storage or a retrieval index and are fetched on demand as summaries and source fragments.

    Layer memory instead of concatenating without limit

    Use at least three layers.

    Working memory is the current reasoning window. It holds only this step’s instructions, relevant excerpts, and evidence just produced. Overlong content is summarized first and then referenced.

    Episodic memory is an event log ordered by task and time. It records who did what and when, input and output hashes or version numbers, and failure reasons. It supports audit and resume-from-checkpoint. It is not replayed in full on every call.

    Semantic memory is stable knowledge: project conventions, interface contracts, user preferences, and confirmed decisions. Writes need a source and a validity period. Entries that expire or are superseded by a newer decision should be down-weighted or invalidated so the agent does not stubbornly follow an outdated instruction.

    Ongoing learning should be cautious. Successful fixes and common failure patterns can be turned into retrievable experience, but safety policy and permissions should not be rewritten without human review. Experience entries should carry counterexamples: the conditions under which they should not be applied.

    State, isolation, and recovery

    Every long-running task needs external state, not a life that exists only inside a conversation. State transitions must be traceable. Moving from pending to running must take a lease so two routers do not dispatch the same work. While waiting on an external result, write the wake condition and the deadline. Before a merge, detect conflicts—for example, whether a file version is still the expected version.

    Design isolation by blast radius. Read-only retrieval can be shared. Actions that change code or data, or that send messages outward, should land in an isolated workspace and pass checks before merge. Parallel executors do not share writable context by default. What must be shared is published by the router as a read-only snapshot.

    Write the recovery policy in advance. Retryable failures—timeouts and transient errors—retry with backoff and a recorded attempt count. Non-retryable failures—acceptance not met, or insufficient permission—become human work items rather than silent retries. After a process restart, rebuild the task graph from the event log. Do not depend on the model “remembering where it left off.”

    People remain the control point

    Outsourcing attention is not abandoning responsibility. Work that is safe to advance automatically has clear boundaries, can be rolled back, and has objective acceptance criteria—for example, organizing material, running a defined check, or generating a draft from a template. External commitments, privilege expansion, irreversible deletion, and production changes should stop at an approval gate.

    The surface shown to people should stay on a few threads: the current goal, blockers, actions awaiting approval, and delivered artifacts. Other sessions fold into the task graph so the screen does not fill with windows again. The router can replace manual history browsing with a short periodic report, but the report must trace back to events and artifacts. A conclusion alone is not enough.

    Observation, cost, and security

    Parallelism without observation only creates chaos faster. At minimum, record task state changes, model and tool call counts, token or duration consumption, retry counts, and reasons for human intervention. Use those signals to limit parallelism instead of adding executors by feel.

    Cost control is more effective at the router. Set a budget per goal and let subtasks inherit a share. Reuse retrieval results for similar subtasks. Store long logs by reference only. When the budget is exhausted, suspend and notify. Do not degrade into unconstrained continued execution.

    On security, keep least privilege. Credentials given to an executor should be short-lived, narrowly scoped, and bound to the task id. Instructions that appear inside a prompt must not override system-level policy. External content is data by default, not a command. Every outward action leaves an audit trail so it is possible to explain later why the schedule was made that way.

    An order for putting it in place

    There is no need to build an always-on system in one step. A steadier order is: write goals and acceptance criteria as checkable items; split the single session into recoverable task state; parallelize only subtasks that do not conflict on writes; then add the event log and checkpoints; and only then enable scheduled wake-ups and limited proactive progress. Each step can be verified on its own: whether work resumes after a restart, whether two executors step on the same artifact, and whether a wrong constraint is remembered for the long term.

    Closing

    The value of a “super” agent is higher task throughput inside the limit of human attention, not a longer context that pretends to remember everything. One router plus multiple executors, layered memory, external state, and explicit approval form a runtime that can be explained and recovered. Continuity, efficiency, initiative, and durability come from boundaries and mechanisms—not from pushing all of the work back into a session that never closes.