Skip to content

The agent protocol

ovld protocol is the authoritative interface between an agent and Overlord. The same operations are available from the CLI, the hosted API, and the MCP surface — drift between them is treated as a bug. This page is the lifecycle you follow while executing a mission.

attach ──► update / heartbeat ──► (ask, if blocked) ──► deliver
│ (repeat) │
└── begins a session, returns full context └── ends the session,
moves objective to
complete, mission
to review

Mode 1 — launched onto a mission. The prompt already contains a mission id or says the session was started by Overlord. Attach immediately and begin the objective.

Mode 2 — asked from chat to use Overlord. A normal conversation where the user asks you to create, inspect, or run Overlord work. Create or inspect, and only attach when the user explicitly says to execute.

Every ovld protocol subcommand that takes --mission-id also takes --objective-id (an objective UUID, or a display id such as coo:312.k7xm).

An objective display id already names its mission — coo:312.k7xm contains coo:312 — so --mission-id is optional whenever you pass one:

Terminal window
ovld protocol update --objective-id coo:312.k7xm --summary "Refactored the parser."
ovld protocol deliver --objective-id coo:312.k7xm --summary "Done."

Reach for the objective form when reconnecting to a mission that is running more than one objective. There, the mission id no longer identifies a unit of work, and commands that rediscover “the active objective” (attach, load-context, connect) return ambiguous_active_objective until you name one.

An objective UUID carries no parent mission, so pass --mission-id alongside it.

The CLI fills --objective-id in from OVERLORD_OBJECTIVE_ID on session-scoped subcommands, so a launched agent rarely types it. Two commands never inherit it: update-objective, where the id names the objective being changed, and discuss-objective, which wants a draft rather than the objective already executing.

load-context, read-context, attachment-list, and attachment-download-url are reads, so an explicit mission (--mission-id or the positional argument) selects the read on its own. An inherited objective from OVERLORD_OBJECTIVE_ID or the launch bootstrap is used only when no mission is named, or when its parent mission display id matches the one you named. A mission UUID cannot be matched locally, so pass --objective-id explicitly to pin that read. Explicit objective/mission pairs are still validated by the backend.

Cross-mission reads never attach, change objective state, move the active mission pointer or session cache, or redirect later updates and delivery:

Terminal window
# Keep the current execution binding while reading another authorized mission.
ovld protocol load-context --mission-id coo:700

The operator-facing mission summary is not part of the agent packet: load-context never returns it.

Unpinned load-context can still return no_active_objective or ambiguous_active_objective; name the objective when it does. list-deliveries is mission-wide and never inherits an objective.

These protocol commands take --objective-id (UUID or display id) as their primary argument. A display id is enough on its own:

Terminal window
ovld protocol launch-objective --objective-id coo:312.k7xm --agent claude
ovld protocol list-deliveries --objective-id coo:312.k7xm
ovld protocol queue-objective --objective-id coo:312.k7xm
ovld protocol dequeue-objective --objective-id coo:312.k7xm
ovld protocol update-objective --objective-id coo:312.k7xm --no-auto-advance
  • launch-objective queues a normal execution request for a runner. It does not attach the calling agent. Required: --objective-id, --agent. Optional: --model, --reasoning-effort, --execution-target-id.
  • list-deliveries returns one mission’s newest-first normalized deliveries as a { items, total, limit } page (summary, verification, follow-up notes, delivery-report evidence — never raw payload JSON); items is capped at 200 and total is the matching count before that cap. A display id supplies the mission.
  • queue-objective adds or moves the objective in the project’s Run Queue (delivery-driven sequencing, not a direct launch). Optional --queue, --after (queued entry, objective UUID, or display id), --front, and one-based --position; choose at most one placement flag.
  • dequeue-objective removes it from the queue. Already-unqueued objectives return { removed: false }.
  • retry-queue-entry retries one held entry: it clears the hold and resets the attempt budget so the dispatcher tries again on the next tick. Address it with --objective-id or --entry; an entry already dispatched or running is refused.
  • run-queue reads every live queue and entry from --project-id, --objective-id, or --mission-id, optionally narrowed with --queue.
  • reorder-run-queue atomically replaces one queue’s complete entry order; every live entry is required exactly once and running/dispatched entries cannot move.
  • create-run-queue, update-run-queue, delete-run-queue, and reorder-project-run-queues manage queue definitions. New queues start paused; explicitly resume one or directly launch a queued objective to start it. Queue-definition operations require project:update; entry operations require execution_request:create.
  • reorder-objectives takes --mission-id and --ordered-objective-ids-json with every draft and submitted objective UUID, exactly once, in the desired order (the head may move; launching, active and complete objectives keep their positions). Display ids are not accepted there. A stale set is rejected; reload and retry.

Hosted MCP exposes the same operations as overlord_launch_objective, overlord_list_deliveries, overlord_list_run_queues, overlord_reorder_run_queue, overlord_queue_objective (remove: true to dequeue), overlord_manage_run_queue, and overlord_reorder_objectives.

Terminal window
ovld protocol attach --mission-id coo:312 --objective-id coo:312.k7xm
ovld protocol attach --objective-id coo:312.k7xm

Pass --objective-id when you already know which objective to execute — attach will not rediscover another one. Runner launches export OVERLORD_OBJECTIVE_ID and the CLI forwards it automatically. Mission-only attach still selects the current active objective, as long as only one is active.

The response prints JSON containing session.sessionKey. The CLI also persists that key for the working directory, so later ovld protocol commands resolve it without --session-key. If auto-resolution fails, pass --session-key <sessionKey> explicitly on every call.

The attach payload gives you everything a fresh agent needs to continue without reading prior chat:

  • objective — the current task body is in objective.objective. Treat it as authoritative for the goal, constraints, and delivery target.
  • previousObjectives / futureObjectives — objectives positioned before and after the current one. These are positions, not states: objectives can launch out of order, so check each item’s state.
  • history, artifacts, attachments, sharedState — structured context.
  • projectResources — the project’s logical resources resolved for the execution target, each with a resourceKey, path, and state. When a project spans repositories, siblings are read-only context unless a future objective launches in them.
  • agentInstructions — concise workflow guidance and pointers into the structured fields.

attach stores an exact objective/session binding for local connector evidence. It does not read Git state or derive a worktree baseline.

Send a real narrative update when something meaningful happens:

Terminal window
ovld protocol update --session-key <sessionKey> --mission-id coo:312 \
--summary "Implemented the loading state and wired it to the query hook." \
--phase execute

During long mechanical stretches with nothing to narrate, send a liveness heartbeat instead — it updates the session without creating a feed event:

Terminal window
ovld protocol heartbeat --session-key <sessionKey> --mission-id coo:312 \
--phase execute --note "Running the integration suite"

Post at least one update before delivering.

--phase accepts: draft, execute, review, deliver, complete, blocked, cancelled. --event-type accepts: update (default), user_follow_up, alert, discussion_summary, decision. Use decision or discussion_summary to make an important non-file decision visible on the mission.

If you cannot proceed without a human decision, post the question and stop:

Terminal window
ovld protocol ask --session-key <sessionKey> --mission-id coo:312 \
--question "Should the loading state block the whole page or just the panel?"

Do not guess past a genuine fork in requirements. Asking is cheaper than delivering the wrong thing.

Delivery is the concluding step. It stores the summary and any optional structured report, moves the objective to complete, and moves the mission to review. A summary-only delivery is valid and is never blocked by file-tracking gaps.

Terminal window
ovld protocol deliver --session-key <sessionKey> --objective-id coo:312.k7xm \
--summary "Added a loading state to the account page and covered it with a test."

Include optional deliveryReport.agentReport evidence in --payload-json or --payload-file when it helps the reviewer: humanActions, tradeoffsMade, knownRisks, deferredWork, and assumptions. Use empty arrays when there is nothing to report. Human actions must be real user follow-up work — never Git operations or routine testing/review.

Each deferredWork item is one recommended objective outside this mission, written as an object { title, change, location, doneWhen } (at most 80, 400, 200, and 200 characters). title names the work in an imperative phrase, change states only the specific change that is needed, location says where to find it in the code, and doneWhen states the observable result in one sentence. String items are rejected with invalid_input.

Reported human actions are shown on the delivery card, where the operator reads them without your session transcript. Each item must stand on its own:

  • action (required): one imperative sentence naming what to do, where, and with which value.
  • reason (expected): why it is needed and what stays broken until it is done.
  • category (expected): environment, database, deployment, codegen, packaging, external_service, or other.
  • blocking (optional): true when the delivered work does not function until this is done.
  • command (when known): the exact command, setting, or value to apply, verbatim, with placeholders in <angle brackets>.
  • verify (when known): how the operator confirms it worked.
  • link (when known): an HTTP(S) URL or a repository-relative file path.

Vague, so the operator must rediscover everything:

{ "action": "Set up the env var for Gemini." }

Complete, so the operator can finish it from the card alone:

{
"action": "Add GEMINI_API_KEY to the production backend service on Railway.",
"reason": "The delivery-compose worker falls back to the raw summary until a provider key is present.",
"category": "environment",
"command": "railway variables set GEMINI_API_KEY=<key> --service backend",
"verify": "The next delivery card shows a composed presentation instead of a fallback.",
"link": ".env.example"
}

Overlord also derives deterministic_rule actions from the changed paths (new migrations, .env.example edits, dependency manifests, CI workflow files) and always shows them, so an omitted report never hides a real step. Reporting the same step yourself with a concrete command and verify gives the operator something better than the generic wording.

Delivery remains immediate: Overlord stores a deterministic report first, then may compose a clearer presentation asynchronously. The optional composer only condenses the facts in your summary and report; it never generates per-file explanations, behavior, or test claims from filenames. When composition is unavailable the raw summary is shown, and the original summary is never replaced.

You do not enumerate changed files, diff, or run git status on a shared worktree to build the list. Reviewers see a separate cumulative list, Files changed during this objective, grouped by resource. An objective-bound connector callback appends a path only for a connector-codec-normalized edit whose outcome is successful; reads, searches, and fetches are silent. The CLI synchronizes that local ledger separately from the delivery request, and never infers ownership from timestamps, cwd, or branch.

Capture reports gaps instead of guessing:

  • shell_activity_unverified — a shell command ran; it may or may not have written files.
  • outcome_partial / outcome_unavailable — an edit failed partway or its result is unknown; no path is recorded.
  • direct_path_unavailable — the tool’s payload could not be mapped to a path.

When you know a write escaped native capture — shell or heredoc writes, script or generator outputs, deletes, or renames (declare both endpoints) — declare those paths on the same update or deliver call:

Terminal window
ovld protocol deliver --session-key <sessionKey> --objective-id coo:312.k7xm \
--summary "Regenerated the API client and removed the legacy shim." \
--paths lib/generated/client.ts,lib/legacy-shim.ts

Use --paths-file <path|-> with a JSON string array when paths contain commas or the list is long. Over MCP, pass declaredPaths (an array of strings) to overlord_update_session or overlord_deliver_session. Declared paths appear with the Declared source. Unsafe paths — traversal, symlinks leaving the checkout, ignored files, or Overlord-managed files — are rejected with a reason and never fail the call; deleted targets are valid. You don’t need exhaustive enumeration: declare known misses, not every file.

Quote an inline --paths value that contains spaces. If attach warned that its local binding or ledger is unavailable, keep the explicit --session-key and --objective-id and still pass the path flags: the CLI warns and submits the paths through the authenticated session as Declared. A failed fallback sync has no local retry copy, so repeat the declarations on a later update or deliver. objective-changes reads that synchronized evidence; local changes reports the gap in capture.healthCodes. Re-run attach in the intended checkout with the same OVLD_HOME to restore native capture.

Run the local-only preflight first. It reads this checkout’s sessions for the objective (scope: local_objective_sessions, synced and pending rows, capped at 200 with pre-cap total/truncated) plus bounded hook health; it never scans or classifies the shared worktree:

Terminal window
ovld protocol changes --objective-id coo:312.k7xm

coverage: unavailable means no local session matched — not that nothing changed. For the server’s view across sessions, resources, and devices (scope: server_objective; it cannot see unsynced local rows), run ovld protocol objective-changes --objective-id <id>.

Inline --*-json values are rejected above ~8 KB. For large payloads, stream on stdin with --payload-file - (or --paths-file - for a long path list). When a summary or question contains backticks, $vars, or other shell-special characters, use --summary-file - / --question-file - with a single-quoted heredoc:

Terminal window
ovld protocol deliver --session-key <sessionKey> --mission-id coo:312 \
--summary-file - <<'EOF'
Refactored `useAccount()` to expose `isLoading`; see $PR for details.
EOF

The working tree may hold changes from other agents, missions, or objectives running in the same checkout. Those are not yours to undo.

If git status shows unrelated dirty paths:

  1. Leave those files intact.
  2. Do not declare paths or describe work you didn’t do, and never infer ownership from timestamps, cwd, or branch.
  3. Run ovld protocol changes --objective-id <objective> to inspect only the current objective’s recorded paths from this checkout.
  4. Deliver the summary normally. Unrelated worktree state is not a delivery input and cannot block the lifecycle transition.

Delivery ends implementation. Do not keep editing unless the user explicitly asks for follow-up work.

  • Ordinary follow-up questions stay in discussion mode; connector hooks record them as user_follow_up activity — you don’t post those manually.
  • Explicit follow-up implementation on a delivered mission:
    • If a live session still accepts updates: ovld protocol update --begin-follow-up-work --follow-up-intent execution --summary "Beginning follow-up work."
    • If no live session exists: ovld protocol resume-follow-up --mission-id <id> --summary "Beginning follow-up work." and use the returned session key.
  • During follow-up execution, post updates and declare any uncaptured paths just like the first pass, then deliver again.

Artifacts do not require delivery. Publish a plan, notes, decision, or URL mid-session, then revise it later if needed:

Terminal window
ovld protocol add-artifact \
--mission-id coo:312 \
--type note \
--label "Implementation plan" \
--content-text-file -

Provide --type, --label, and at least one of --content-text / --content-text-file or --external-url. An optional --session-key (auto-injected from the attach cache when present) stamps session/objective provenance; --objective-id does the same when you have no live session, and the session key wins when both are given. Hosted MCP exposes the same call as overlord_add_artifact.

When a later objective or follow-up must revise a plan, notes, or URL artifact created earlier, update that artifact in place instead of delivering a duplicate:

Terminal window
ovld protocol update-artifact \
--mission-id coo:312 \
--artifact-id <artifact-id> \
--expected-revision 2 \
--label "Revised plan" \
--content-text-file -

Use the id and revision from attach / load-context artifacts or ovld mission artifacts. Provide at least one of --label, --content-text / --content-text-file, or --external-url. No session key is required. Stale --expected-revision returns a conflict — refresh and retry. Hosted MCP exposes the same call as overlord_update_artifact.

A mission is a whole feature or goal. An objective is one agent pass — one prompt. Create a new mission for a distinct goal; add objectives to an existing mission for sequential steps toward the same goal:

Terminal window
ovld protocol add-objectives --mission-id coo:312 \
--objectives-json '[{"objective":"Implement the API"},{"objective":"Add CLI docs"}]'

Every objective item on create, prompt, and add-objectives takes an optional agent (and model, which requires an agent). --objective-agent / --objective-model supply that selection for items naming no agent of their own. Assign the agent on the objectives you are already creating — never create a mission and then append a second objective just to name one:

Terminal window
ovld protocol create \
--objectives-json '[{"objective":"Implement the API","agent":"codex","model":"gpt-6.1-terra"}]'

This is distinct from --agent, which records who created the mission (and, on prompt, which agent attaches to it).

Command Purpose
attach Start a session, return full context. Begin work.
connect Lightweight session without full context assembly. --objective-id pins it.
load-context Read mission context without a session (inspection only). --objective-id selects the objective.
list-deliveries Read one mission’s normalized deliveries as { items, total, limit } (items capped at 200). An objective display id supplies the mission.
launch-objective Queue a runner execution. Requires --objective-id (UUID or display id) and --agent.
reorder-objectives Replace one mission’s complete draft/submitted UUID order.
run-queue Read live Run Queues from project, objective, or mission scope.
reorder-run-queue Atomically replace one Run Queue’s complete entry order.
queue-objective Add or move one objective in the Run Queue. Requires --objective-id.
dequeue-objective Remove one objective from the Run Queue. Requires --objective-id.
retry-queue-entry Retry one held Run Queue entry. Requires --objective-id or --entry.
create-run-queue Create a paused queue definition; requires project:update.
update-run-queue Rename, pause, or resume a queue; requires project:update.
delete-run-queue Delete a queue definition; requires project:update.
reorder-project-run-queues Replace the complete queue-definition order; requires project:update.
discover-project Resolve the project from cwd, id, or directory.
search Find missions by query, state, project; --reference <token> --project-id <ref> is the exhaustive exact-token mode (page with --cursor until complete: true).
statuses List one project’s board columns.
discuss-objective Submit a draft objective for discussion (no session). --objective-id names which draft.
create / prompt Create a draft / create-and-attach a mission. The response returns the persisted mission and objectives so you can verify agent, model, resource, and queue/auto-advance settings.
add-objectives Append ordered objectives to a mission; returns each persisted objective’s launch settings.
update-objective Turn auto-advance on or off, edit instruction text, or reassign with --objective-agent (manual/human for a person). Requires --objective-id.
update Post progress and decisions; optionally declare uncaptured paths.
heartbeat Liveness ping, no feed event.
ask Post a blocking question and stop.
deliver Finish: summary, artifacts, optional declared paths, mark complete.
changes Local-only read of this checkout’s recorded paths for an objective.
objective-changes Server read of an objective’s changed files across sessions and devices.
resume-follow-up Reopen a delivered objective for follow-up.
read-context / write-context Read or store persistent shared context.
add-artifact Create a mission artifact mid-turn (no delivery required).
update-artifact Revise an existing mission artifact in place.

For the full CLI surface — management commands, the runner, project linking — see the CLI reference. Never invent protocol subcommands; run ovld protocol help when unsure.