Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
ADR-0041 — Several orders at once: background tasks in a live call, parked requests in chat
Status: Accepted · Date: 2026-10-13 · Extends: ADR-0034 for the continuous voice sessions of ADR-0036 and for the typed chat
Context
The user gives one order, and while it is still being carried out gives the
next: "brief the agent in terminal two", then "create an agent for the docs",
then "and look up X". ADR-0034 made a heavy turn stop blocking the legacy
realtime session. The sessions every realtime provider uses today
(dodaios/live) and the typed chat still handled one order at a time:
LiveTools.executeheld one lock for the whole execution, so every tool of a call ran strictly after the previous one, across turns.- In the subscription session a follow-up was accepted but reasoning took it only "after the current tool returns its receipt". A tool that ran for twenty seconds held the second order for twenty seconds.
- A tool released at the voice budget reported back only if the user had said nothing since. Any new sentence dropped the report, so the model never learned that the first order had finished.
- A released tool counted as pending work, so one long action kept every other report (an agent's result, another tool's receipt) waiting.
- In the typed chat a turn that had handed work to a coding pane or an agent stayed open until that work reported back, for up to thirty minutes. The next message waited in the queue behind it.
spawn_workeranswered every spawn inside thirty seconds of a running one with "already running", including a different order from a later turn.
Decision
One vocabulary for both surfaces: an order that outlives the attention of the conversation continues in the background, the conversation takes the next order at once, and the result comes back later naming the request it answers. No new model, no sub-agent type and no background model call is introduced; the work that continues is the action that was already started.
1. Live voice: independent actions run side by side
LiveTools serializes only what shares a resource: the screen tools
(computer, take_appshot, computer_use) and the hang-up control
(end_call). Every other call runs concurrently, confirm_action included:
it takes its pending approval in one step and then runs the approved effect.
One call ID delivered on two transports still executes once: the second waits
for the first one's receipt.
2. Live voice: an action the user moved on from becomes a background task
LiveTools.execute_releasable waits for a call until it should no longer
hold the conversation:
- an action still running when the user gives the next request
(
revisionchanges) is released after a short grace (MOVE_ON_GRACE_S), so an action about to finish still answers its own call; - any call still running after the caller's deadline is released (the native wire, where the model is blocked on the result, passes the existing voice budget). A lookup is never released by new speech: its answer belongs to the question that asked for it.
The call is answered with a pending receipt that carries a task_id. The
action is not cancelled and not repeated; it finishes on the call's
TaskBoard (dodaios/live/tasks.py) and keeps its durable receipt in the
ledger. All three session classes use the same path: the native session with
the voice budget as deadline, the continuous and the subscription session
without one.
An approved effect (confirm_action) is an action like any other and leaves
its turn the same way. An action that reaches its approval question only after
it was released keeps that question: the task ends as needs_approval and the
report asks the user, instead of the order being withdrawn as overtaken. Such
an approval cannot be answered before its report was told: a yes the user gave
to another question in the meantime never approves it.
3. Live voice: the receipt is told at a pause, and it may finish what waited
When a background task ends, the session queues its receipt and offers it at the next pause (nobody speaks, no answer is being generated, no tool the model waits for is running). A running background task does not hold a pause back. The report:
- is delivered whatever the user said in between when the task was an action; a late screen or lookup result is still dropped once the request changed, as before;
- carries the request the action was started for, and asks the model to open
with it (
task_report_prompt); - is the deferred function result, so the model keeps its tools for what the user had already asked for and was waiting on it ("start an agent" … "tell it to run the tests"). It is told not to repeat the finished action and to start nothing new;
- stays owed when the call does not voice it, for a bounded number of pauses.
A stop word cancels every running background task. task_status lists the
tasks of the call with their request, state and a shortened result without
pictures, and stops one by id.
The same call is the one board of everything running for the user. Besides this
call's tasks it reads every open coding agent with its workspace's git state, the
missions that have not ended and the agent team, each through the gated tool the
model could call itself, and names what is waiting for the user in needs_you.
A source the install does not have is left out; one that fails says so in its own
section. scope: call returns only this call's tasks.
4. Chat: a turn that only waits hands its seat to the next message
On Dodaios' own chat (surface jarvis), a turn whose model work is done and
which only waits for delegates gives up its seat when the person sends another
message (dodaios/agent_chat/parked_work.py):
- the turn closes with what it has said, and its
turn_finishednames who is still working (background); - the same
DelegationWaitcontinues outside the turn, reading the same local evidence and calling no model; - when the delegates have reported, the earlier request continues in a turn of
its own, opened by a
user_messagewithorigin: "background"that the timeline draws as "result for your earlier request"; - every turn started meanwhile is briefed on which requests still run behind it. The briefing is part of the turn's instructions, never of the person's message.
The brain reads a turn's text for its deterministic routes: which coding pane
an order addresses, what to cancel, where to navigate. A continuation quotes
the original order and the agents' reports, so it travels as the turn's
briefing too and the turn's text is a neutral "continue" line. Read as the
person's words it would send the original order to the pane a second time;
that also holds for the continuation of a wait that kept its turn. Tools that
check a call against what the person asked for still receive the original
request (person_request in the turn's tool context), and the reply language
is resolved from it.
A stop pressed during a turn stops that turn and leaves earlier requests alone. A stop pressed while nothing answers, and deleting the chat, drop the requests that still wait for their agents; the agents' own work is untouched.
A turn that is still answering or running a tool keeps its seat, and the new
message queues behind it as before; when that turn then starts waiting, the
queued message starts. A wait nobody interrupts keeps its turn, exactly as
before. An agent's own chat (society) keeps holding its turn.
5. A second typed order is not a duplicate spawn
The spawn window exists for fragments of one utterance. A typed message is a whole turn the person finished, so a spawn from another typed message dispatches while the first still runs, provided the task is that message's own order in the person's words: at least half of what they typed is in it, and it is not the running order again. A short follow-up ("and?"), a repeat, and every spoken spawn stay under the window. Speech arrives in pieces on every voice engine, and no engine names a finished order to the tool.
Consequences
- Orders given in quick succession in a live call or in the chat start right away and report back one by one, each tied to its request.
- No additional chargeable call: the report of a background task is the model round the tool result would have caused anyway, and the chat continuation is the round the held turn would have run.
- History order changes in the chat: a parked request's answer is appended when its delegates report, possibly after later exchanges. The timeline marks it, and the continuation prompt tells the model to name the request.
- Parked chat work and background tasks live in memory. A restart forgets the wait, never the delegated work, whose own report still reaches the chat or the next call.
Not covered
- The classic voice pipeline still runs one turn at a time (ADR-0034 §3 is not built).
- Background missions still run one after another
(
max_concurrent_missions = 1, a capacity decision for subscription workers); a second mission is accepted and queued. - In a voice call a second background mission ordered within the spawn window of a running one is still answered as already running (§5).
- A mission's result is read back in voice and shown in its own views; it is not posted into the typed chat that started it.
Alternatives considered
- Concurrent turns in one chat session. The service, the approval cards, the stop button and the timeline all assume one running turn; the long part of an order is the delegated work, not the model's answer, so freeing the seat during that wait gives the behaviour without rewriting the session.
- Release every live tool call after a fixed time. Changes the common case of an action that finishes within a few seconds into a later report for no gain; outside the blocking native wire only the user moving on is a reason to stop waiting.
- Report a background task without tool authority. Loses the order that depended on it; the receipt is the function result the model was promised.
- Text similarity alone for the spawn window. Fragments of one utterance have different words; the turn identity is what tells a second order apart.
- The live call's request counter as a turn for the spawn window. It advances per transcript piece on two of the three sessions, so one spoken order spans several values and a reworded repeat would pass.
- The background note inside the person's message. It names the earlier order and its pane; the deterministic pane route would then type an unrelated new message into that pane.
References
dodaios/live/tasks.py,dodaios/live/tools.py,dodaios/live/session.py,dodaios/live/native.py,dodaios/live/subscription.py,dodaios/realtime/report_prompt.pydodaios/agent_chat/parked_work.py,dodaios/agent_chat/delegation_wait.py,dodaios/agent_chat/send_queue.py,dodaios/agent_chat/service.pydodaios/plugins/tool/spawn_worker.pytests/unit/live/test_background_tasks.py,tests/unit/agent_chat/test_parked_work.py,tests/unit/plugins/tool/test_spawn_worker_cooldown.py