Skip to content

Missions and intake

AI6 does not bundle tracker integrations. A user or external integration supplies a Mission brief through the Universal Exports API or the file-backed Registry. The Rust daemon validates the brief, resolves its Operation and Agent policy, and schedules the Mission at an eligible Station.

source ─► brief ─► Registry ─► AI6 Station ─► AgentHandler ─► Run
                                                │
                                                └─► outcome and DipTels to Universal Exports

Mission and Run identities

A Mission ID identifies one unit of work and may group multiple agent Runs. It is a UID, a UUIDv7 in lower-case text (019a1b2c-3d4e-7f00-8123-456789abcdef), minted where the brief enters the Registry. It is the Registry's key, and every relation uses it: Run records, Cables, reviews, linked issues, green ink, memories, audit records, the timeline, controls and routes. It never changes. A Run ID comes from the provider and remains stable when AI6 resumes that same agent operation.

What people see is the Mission's handle, which AI6 gives where the brief enters, so a person can recognise a Mission from it. A tracker's code is the tracker's: the handle may quote it, and the link to the issue stays apart from it.

Where it came from Handle Example
A person, ai6ctl, Moneypenny, an Agent's proposal, a review <operation>-<n> ai6-42
A Jira Source <operation>-<item key> ai6-AI6-64
A GitHub Source <operation>-gh-<number> ai6-gh-63
A GitLab Source <operation>-gl-<iid> ai6-gl-12
A Source instance that is not its provider's only one in the Operation its instance name replaces gh or gl; a Jira key already names its project ai6-backend-63
A Sleeper <operation>-<sleeper>-<n>, the same counter ai6-nightly-43
  • The counter is per Operation and shared by every Station and gateway on the Registry. Numbers count Missions in the order they entered and are never reused, even when a brief is deleted. A brief with no Operation uses mission in its place. A review and a proposal take their number when they enter the queue; a proposal has none while it waits.
  • The Mission stays the same through a retry, a return to the queue, a resume and a Station restart, on every Station. A re-polled item or a repeated approval finds the Mission it already names, and an item keeps its Mission if the Operation adds a second instance of its provider later.
  • Nothing reads a code or a number back out of a handle. Only ASCII letters, digits, _ and - stay in it, so a code with odd characters is made safe rather than refused, and the handle is valid as a Git branch and a URL part. Past [registry.limits.briefs] handle_bytes it keeps its start and adds a short hash. A handle is unique across the Registry, compared without case, and never given twice: when one is already taken (Operation ai6-gh's Mission 63 and Operation ai6's GitHub item 63) a number is skipped or a short hash is added. No handle reads as a UID.
  • A brief dropped into the Registry's queue by hand goes through none of this: its key is <source>--<id> from its own fields, and it goes by that.

A handle can be renamed by whoever holds mission.control on the Operation, to any handle no other Mission was ever given, in the same character set:

curl -f -X POST "$UNEX_URL/v1/user/operations/G/missions/ai6-42/rename" \
  -H "authorization: Bearer $UNEX_ACCESS_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"handle":"ai6-flaky-watchdog"}'

The answer is {"operation_id", "mission_id", "handle", "previous"}; a refusal is {"error": TEXT} with 400 (a malformed handle), 409 (a handle another Mission had) or 404. A rename changes nothing kept by the UID, and the old handle stays reserved and still names the Mission, so old links and tracker comments keep working; the Mission can take a former handle of its own back. It is audited as mission.rename and shows on the timeline as a control rename.done with the old and new handles. ai6ctl missions rename MISSION HANDLE and the Rename action on Outer Office's Mission detail do the same.

Every route and ai6ctl command that names a Mission takes its UID or any handle it had, compared without case, and answers with its UID (mission_id) and its current handle; GET /v1/missions?mission=ID finds one. What leaves AI6 takes the handle the Mission has when it is written: the branch of its safe house, a tracker comment, a report. A rename does not rewrite them.

A run is one Run record of a Mission. It has a UID of its own, and a handle <mission handle>.<run> from the handle the Mission had when the run opened: ai6-42.1, ai6-42.2. A Mission has one record per run. The run keeps its handle through a resume and a rename, and the provider's Run ID stays apart from it, shown as it always was.

A name sits beside the handle and is no part of it: a person's title, or an issue's title on one line and cut to [registry.limits.sources] name_bytes. Whoever can open an issue writes that title, so it is data: it reaches a prompt only inside the fence with the rest of the issue's text, and Outer Office and ai6ctl show it as plain text. Outer Office and ai6ctl mission also link to the issue, and search matches the ID, the handle, the run and the name.

{
  "title": "Fix the flaky watchdog test",
  "prompt": "It fails one run in ten on macOS.",
  "operation_id": "G"
}

Queue a Mission through Universal Exports

An authorized user needs mission.create for the target Operation. The gateway returns the queued Mission's UID and handle without echoing the prompt:

curl -f -X POST "$UNEX_URL/v1/user/operations/G/missions" \
  -H "authorization: Bearer $UNEX_ACCESS_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"title":"Fix the flaky watchdog test","prompt":"Investigate the intermittent failure."}'

Outer Office makes the same call from its New Mission page (/new_mission?operation_id=G), opened from the Missions page, its empty queue and a Station's card for a person who holds mission.create: the Operation, the title and the instructions, where it would run, and Queue Mission, which opens the Mission on the board. Where Moneypenny is served the page also has Draft with Moneypenny. The AI6 daemon claims the brief from the shared file-backed Registry, then resolves the Agent role, Operation cover, Station capacity and provider handler before it starts a Run.

Work on a ticket is numbered by the ticket:

  • "issue": {"tracker": "gh", "item": "o/r#31"} follows up an item of one of the Operation's tracker instances that already has a Mission (G-gh-31). The new Mission takes that Mission's handle as it is now and the item's next follow-up number, from 2: G-gh-31-2, then G-gh-31-3. It is linked to the item (related). An item with no Mission is refused 400 with the reason.
  • "create_issue": {"tracker": "gh", "title": "...", "body": "..."} creates the Mission's ticket first, and needs issue.create as well; the title and body default to the Mission's. The answer is 202 with state: "awaiting_issue" and the issue proposal (an approved one), and no handle yet: the Headquarters Station creates the issue and then enters the Mission, numbered by it as its Source numbers items (G-gh-104) and linked to it as its source. A tracker that cannot create issues says so on the proposal (failed), and no Mission enters. The item, polled later, leaves the person's brief as it is.
ai6ctl missions create --operation G --title "Add the regression test" \
  --prompt "Cover the fix." --issue gh:o/r#31
ai6ctl missions create --operation G --title "Fix the login page" \
  --prompt "It times out." --create-issue gh
ai6ctl missions create --operation G --title "Retake the build fix" \
  --prompt "The first run missed the linker." --handle ai6-build-fix-retake

"handle": "ai6-retake-31" names the Mission yourself, in place of the Operation's next number. It follows the rename rules above and is refused 400 when malformed and 409 when any Mission, current or former, ever had it, compared without case; it takes no number from the Operation's counter. It cannot be asked for beside issue or create_issue, which number the Mission by its item.

"stations": ["ID", ...] pins the Mission to those Stations. A pin is an exact Station ID ([station] id, or the HOST-xxxxxxxx a Station gives itself), so one that names no Station that ever checked in, or one the Operation's own stations leaves out, is refused 400 with the reason; an unknown pin is told the IDs it equals ignoring case and those of Stations on a host of that name.

A brief placement finds no place for stays queued, and the Headquarters Station says why once per brief and reason, in its log and on the Operation's timeline (account, waiting, with brief and reason): each Station, Theater and Agent ruled out, with its reason. A pinned brief is told only about the Stations it names, and about each that never checked in. Reasons that differ only in their figures (seconds silent, Missions held) are one reason.

A Mission whose harness its Agent's environment cannot find fails at its first start instead of being tried again: the Station looks the handler's program (AgentHandler::program) up on that environment's own PATH, never its own, and fails the Mission with "Agent X has no PATH in its environment (no [loadout.X] env)" or "... is not on its PATH"; the brief is filed failed with that reason.

Deleting Missions and Runs

A Mission, or one of its Runs, that is over can be deleted, with everything the Registry keeps by it. Delete is for the Missions nobody needs any more: ones that failed before they started, the clutter of a test, a brief that should never have been filed. Deleting needs mission.delete (or run.delete) on the Operation. Both are held by the chief and the seeded controller role, and by no other seeded role; the default cap withholds them from an Operation's own roles, so an Operation's administrator cannot hand them out unless the global policy says so.

# One Mission, by its UID or any handle it had; --if-revision refuses when it moved on since you read it.
curl -f -X DELETE "$UNEX_URL/v1/user/operations/G/missions/G-12?if_revision=$REVISION" \
  -H "Authorization: Bearer $UNEX_ACCESS_TOKEN"

# Several at once: one answer per Mission, and one refused Mission does not stop the rest.
curl -f -X POST "$UNEX_URL/v1/user/operations/G/missions/delete" \
  -H "Authorization: Bearer $UNEX_ACCESS_TOKEN" -H 'Content-Type: application/json' \
  -d '{"missions": ["G-12", "G-13"]}'

# One Run, by its AI6 ID; its Mission stays.
curl -f -X DELETE "$UNEX_URL/v1/user/runs/$RUN_ID" -H "Authorization: Bearer $UNEX_ACCESS_TOKEN"

The Registry refuses a Mission that is queued, held or claimed (409), one that has a Run that is still live, and a Run that is live; only a Mission whose brief is done or failed and whose Runs all ended or were lost goes. GET /v1/operations/{operation_id}/missions/{id} names the Mission's revision: a number that changes whenever its state, its count of claims or its outcome does; a delete that names an older one (if_revision) is refused 409, with the revision it is at now.

What goes, in one step (one transaction in SQL, the Registry lock for files): the Mission's brief with its lease, outcome and provenance, its Runs with their final reports and harness contexts, its Run ledger, reviews, green ink requests, linked issues, the questions and replies on them and the issues its Agents proposed. Deleting a Run alone takes its final report, its harness context and its share of the Mission's usage totals; the Run ledger is the Mission's and stays. The route answers {operation_id, mission_id, handle, removed} with how many records of each kind went.

What stays, so that deleting changes nothing it should not:

  • What it spent. The Mission's usage ledger stays (deleting a Run keeps its cost on its day, too), so the Operation's spend for the day is the same before and after a delete, and a budget that was spent stays spent.
  • That it was handled. The Mission's handles and the entries that named it (a tracker item, a Sleeper's window, a review, an approved proposal) stay in the book, with a tombstone that says the Mission was deleted. Intake treats the item as handled: polling the same tracker item, or the same Sleeper window or review, files no new Mission (the item reads as finished), and a handle is never given again. To run an item again on purpose, queue a follow-up: POST .../missions with issue: {tracker, item} (ai6ctl missions create --issue TRACKER:ITEM) gives it a new Mission, G-gh-31-2, linked to the item.
  • The Operation's Mission counter; the audit log, which holds mission.delete (or run.delete) with the person and resource mission:UID, written before the Registry is touched, so a refused delete is audited too; and the Operation's timeline, which gets a control delete.done event naming the handle and what went.

Every Station drops a deleted Mission from its book, board and check-in at its next check-in, with no restart (failed_starts included). It does so only on a definite answer: the Registry has no brief for the Mission and holds its tombstone. A Registry that cannot be read, times out, or is new or the wrong one (it answers empty for everything) drops nothing. The gateway forgets the Mission's live Runs at once.

ai6ctl missions delete MISSION [--operation OP] [--if-revision N] and ai6ctl runs delete RUN do the same. ai6ctl missions delete --operation OP --state failed [--no-runs] lists what it would delete (with --no-runs, only Missions with no Run record, those that failed before a harness started) and deletes nothing until it is run again with --yes. Outer Office has a Delete action on a done or failed Mission's page and on each ended Run, each with a confirmation that names what goes (the Mission's delete names the revision the page was shown, so a Mission someone else changed meanwhile is refused). Moneypenny proposes a delete (propose_mission_delete, one Mission or a list, and propose_run_delete); nothing happens before the person confirms it, and the confirmed request is the route above, as that person.

Retention

An Operation can have its done and failed Missions deleted by itself once they are old. It is off until settled_missions is set, so nothing is purged unless asked:

[operation.G.retention]
settled_missions = "30d"   # 45s, 90m, 12h or 30d; unset keeps every Mission
max_per_pass = 100         # most Missions one pass removes from the Operation, oldest first; "none" lifts it

A Mission is old once its last Run ended that long ago, or once its brief was made when it never had a Run; a brief with neither time is never purged, and neither is a Mission that is queued, working or has a live Run. The Headquarters Station (the elected one, so two Stations never purge at once) runs a pass at each check-in: it writes one audit record, action retention.purge on station:ID, whose target names each Operation and how many Missions it loses (G=3,H=1), and then deletes the Missions through the same delete as above, so spend is kept and a tombstone left. Each Operation's timeline gets a control retention.done event with the pass, the Missions removed, those skipped and what went. A pass that finds nothing writes nothing. max_per_pass keeps a first pass over a long history from holding the Registry; the rest goes on the next passes.

ai6ctl missions purge --operation OP (or POST .../missions/purge with {}) lists what a pass would remove now, from the retention the Station last checked in with, and --dry-run says so; nothing is deleted. Running the pass by hand needs mission.delete and --yes ({"dry_run": false}): one audit record for the run, then each delete audited as above. An Operation with no retention answers 409.

Searching Missions

GET /v1/missions/search finds Missions in the Registry, whether or not anything was published for them, newest first. Each filter you give must match:

Query Matches
operation The Operation's Missions.
agent Missions assigned that Agent codename.
state new, held, claimed, done or failed: where the brief stands.
handle A piece of the current handle, or a handle the Mission ever had, written whole.
ticket A tracker item's key (owner/repo#31), or its number or code (31).
text Words that must each appear, without case, in the title, the name or the brief, or in the outcome.
limit Missions in the page.
curl -f "$UNEX_URL/v1/missions/search?operation=G&state=done&text=linker" \
  -H "authorization: Bearer $UNEX_ACCESS_TOKEN"
ai6ctl missions search --operation G --state done --text linker

The answer is {"missions": [...], "more": BOOL}: each Mission with its mission_id, handle, operation_id, state, agent, role, title, name, url, ticket, created and attempts. It holds only what the person may read: mission.read on the Mission's Operation, or a compartment giving it on that Mission (the crossing is audited before the Mission is shown). Anything else is left out as if it did not exist, so a search cannot be used to learn that a Mission is there.

[search] in the unex record bounds it: page (Missions in a page when limit is not given), max_page (the most limit may ask), scan (briefs read from the Registry for one search; a Mission beyond them is not found) and filter_bytes (the longest any one filter). A request over a bound is refused 400.

In Outer Office, open Search the Registry on the Missions page to use these filters. Mission and Run deep links also look up individual records in the Registry when the board does not list them. The Mission's Runs tab shows retained attempts and their final messages.

Backfilling historical Mission Reports

An operator with mission.control on an Operation can run the backfill once for that Operation.

ai6ctl missions backfill --operation G
curl -f -X POST "$UNEX_URL/v1/user/operations/G/missions/backfill" \
  -H "authorization: Bearer $UNEX_ACCESS_TOKEN"

The command files a closed mission-outcome Report from each finished Mission's retained final message in its filed outcome. It adds a Mission link to those Reports and to older Reports whose filer identifies a Mission in the same Operation. It uses the message as retained in the outcome. When that record has no final message, the Mission appears in the unfilled list.

The response gives missions_scanned, reports_created, links_added and unfilled. Each unfilled entry gives the Mission ID, the existing Report ID if applicable, and the reason. Every invocation is audited as mission.backfill. Repeating the command against the same historical records creates no Reports or links. Normal Registry size and count limits apply; historical filings bypass the Agent rate window and do not prune existing closed Reports.

A standing order whose windows resume the last run's session (resume = true) is measured the same way: the tokens its resumed Runs have taken in (input, output and cache writes) are summed along the chain of Runs that shared one provider session. At or past [harness] compact_at_tokens, or compact_at_cap_percent of the smallest token_cap among its Agent's routes, the window resumes the last run's session and compacts it before sending the brief (if its handler declares it; a declared compaction with no report within [harness] compact_wait has failed); if the handler cannot, or compaction fails or leaves it over the size, it clears the session and sends the brief after the last run's own account of what it did; and if neither works the window's Run is closed and the next try starts a fresh Run with that account as its summary, as for a resume the provider refused. The timeline says which step ran, with the tokens before and after, and the Run record keeps the size left, so the next window counts from there instead of compacting again. [harness] compaction = "fresh" starts the fresh Run at once, as before.

A full context window is shortened in the Run, then replaced. A harness that reports a limit that follows the work and not the account (a conversation past its model's context window) is asked to compact in its running session, then to clear, and the Run is told to carry on where it left off (after the last run's account and the brief, if it was cleared). Only if the session can do neither is the Run closed and the Mission queued again for the same Agent as a fresh Run, given the brief and what the old Run last did, oldest first, and the old Run's record says window-full. The turn is retried once in the Run; a Run that fills the window a second time is replaced by a fresh Run, and a fresh Run that fills it too fails the turn, with the reason. Such a limit never parks the Mission, marks an account limited or hands it to a backup Agent, since waiting, another account and another Agent meet the same window. A standing order's window does not resume a Run that ended full. Moneypenny's conversations do the same: her running harness compacts, or clears and is given the conversation's recap, and takes the message again; a conversation that cannot be shortened in its harness starts afresh with its recap as before.

Cancel, retry, resume and interrupt

An operator with mission.control on the Operation can act on a Mission without reaching its Station:

Action Accepted when the Mission is Effect
cancel any state The live Run is interrupted and closed; the Mission is abandoned and its safe house is finished with the work kept. A Mission no Station has taken yet is withdrawn instead (below), and one that already ended stays as it is and answers applied with its state.
retry stalled, done, failed, blown or abandoned The Mission is queued again as a new run, for agent when one is named (configured for the Operation, qualified for the Mission's role and not quarantined), else for the Agent the roster gives it now; it continues in the same safe house.
resume parked, blocked or stalled The Mission resumes now on its Run, with message sent to the Agent, or a line telling it to carry on: a harness started again does nothing until it reads one.
interrupt working The Run's current turn stops, however the harness reports that; the Mission waits, blocked with reason interrupted, until it is resumed.

There is no pause: providers have none. A quarantined Mission is released by an operator (ai6 quarantine release), not retried.

curl -f -X POST "$UNEX_URL/v1/user/operations/G/missions/mission-007/actions" \
  -H "authorization: Bearer $UNEX_ACCESS_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"action":"resume","message":"The review is unblocked; carry on.","idempotency_key":"resume-1"}'

A Mission Universal Exports does not know under the Operation in the path (no Run record, brief lease, brief in any state or board entry of that Operation), or that any of them puts in another Operation, is refused 404, before anything is audited. Otherwise Universal Exports audits the request (mission.cancel, mission.retry, mission.resume, run.interrupt) and queues the control for the Station holding the Mission's latest Run record; failing that, the Station holding its brief's lease; failing that, the Headquarters Station. A Station that has gone dark is passed over. That Station is the authority: it checks that the Mission is in its book under that Operation, that it still holds the Run's lease with its fencing token and, when the request named a run_id, that the Run is still the Mission's current one, then applies the control and reports applied or rejected with the Mission's state and a reason. A cancel of a Mission no book holds, whose brief has ended, is applied with the brief's state; with no Station to ask, Universal Exports answers that itself. Follow the control with GET .../actions/{control_id}: it reports expires_at (when it expires unacted, [controls] ttl after it was asked), queued_ahead (controls queued before it for the same Station) and station_seen (that Station's last check-in), so a queued control is told from a lost one. One no Station acts on within ttl is expired. The queue is kept in the Registry, so a gateway that restarts takes it up where it stood. Repeating a request with the same idempotency_key returns the first one.

ai6ctl mission cancel|retry|resume, ai6ctl exec and ai6ctl run interrupt do the same and wait for the outcome; Outer Office offers them in each Mission card's menu, with the reason any action is unavailable. Closing a Run view never sends a control.

Executing a Mission (retry) or a Run that ran (resume) is one step on the Station, however it was asked for. Every start of a Run, the first and each resume, is recorded on the Run: the handler and Station, where its conversation came from (fresh, resumed from the provider's own history, or a hand-off from an earlier Run) and the prompt it was given, as an excerpt of [registry.limits.runs] prompt_excerpt_chars characters with the prompt's whole length and SHA-256. ai6ctl mission MISSION and ai6ctl run RUN print them as START lines.

A retry that names no Agent chooses one again from the roster as it is now, as placement would: the best posted Agent qualified for the Mission's role and its brief's tags, not quarantined, held or retired, whose handler the Station can run. The Agent the Mission had keeps it while it still qualifies and ranks as high; a retry no Agent can take is rejected with the reason.

Withdraw a queued Mission

A Mission no Station has taken, its brief queued or held, has nothing to cancel on a Station. An operator with mission.control withdraws it:

curl -f -X POST "$UNEX_URL/v1/user/operations/G/missions/G-12/withdraw" \
  -H "authorization: Bearer $UNEX_ACCESS_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"note":"pinned to a Station that was retired"}'

The brief is filed as failed with the outcome withdrawn and the reason "withdrawn by PERSON: NOTE"; a Source still gets its report. The withdrawal is audited (mission.withdraw) and put on the Operation's timeline (intake, withdrawn). A Mission a Station has taken, or that ended, answers 409 naming mission cancel, and one the Operation has no such brief for 404. ai6ctl mission withdraw ID [--note TEXT] does the same, and a cancel of such a Mission withdraws it with no note and answers applied, state failed.

A cancel the Station never confirms

Universal Exports records when a cancel of a claimed brief was first asked for. When the Station holding it has not finished the brief [registry.limits.briefs] cancel_settle_after (300 s) later, because its Run is wedged, the control never reached it, or it went to another Station, the Headquarters Station files the brief as failed, "cancelled; the Station did not confirm", with the Station and the Mission's Run at the time, and releases its lease. The Station holding the Mission, finding at its next check-in that its brief was settled so while it is still on that Run, stops the Mission; one retried since runs on.

A brief that settles before its Mission starts

A Mission waiting to start reads its brief first, when the Station starts and again before each retry. A brief the Registry has filed as done or failed while it waited (a withdrawal, or a restart that lapsed its lease), put back in the queue or held, or claimed by another Station, is not started or tried again: the Mission is dropped from the Station's book, and the timeline says so once (mission, dropped). A retry an operator or a review asks for after the brief was filed still runs.

A Mission that was working when the Station stopped is checked the same way at start: a brief that ended or went elsewhere ends the Mission without resuming it, and one whose Run record is gone, ended, lost or another Station's has its run handed back as "Run lost at restart" under the Operation's on_lost.

A start that cannot succeed whatever is tried fails the Mission at once with that reason, and its brief with it: an Agent not posted to the Operation, an Operation with no checkout path, a safe house provider that is not there, or a safe house that cannot be opened. A start that fails any other way is tried again after [scheduler] retry_backoff (5 seconds), each further failure in a row doubling the wait up to [scheduler] retry_backoff_max (600 seconds); neither has a floor. A failed start leaves no Run record.

If a claimed Mission's Station no longer answers, ai6ctl mission settle HANDLE --reason TEXT files its brief as failed with that reason (needs mission.control, audited). A Station that answers is asked with mission cancel.

Checking an outcome

An Agent saying it finished is not the work being done, so what it said is kept and a person can record what they found.

The final report. The message an Agent ends its turn with is filed against its Run, up to [registry.limits.runs] final_report_bytes (64 KiB) with a cut marked, and goes into the Mission's outcome as final_report when its brief is filed. A later turn replaces it. Everyone who may read the Mission reads it, in GET /v1/operations/{operation_id}/missions/{mission_id} (each run's final_report; the list of Missions leaves it out), in ai6ctl mission ID and in the Outcome section of the Mission's page. It is the Agent's own account, as data. What another Operation may read of a Mission through a compartment does not include it.

A verdict. A person with mission.verify on the Operation gives one on the latest run, once it has ended done or held, or is verifying; anything else is refused (409, saying how it stands):

curl -f -X POST "$UNEX_URL/v1/user/operations/G/missions/$MISSION/verdict" \
  -H "authorization: Bearer $UNEX_ACCESS_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"verdict": "failed-verification", "note": "the tag was never pushed"}'

ai6ctl missions verdict "$MISSION" disputed --note "not on main"
Verdict On a done Mission On a held Mission On the scorecard
confirmed Stays done Becomes done Done
disputed Stays done, and shows it Becomes failed Disputed: a failure of that Agent
failed-verification Stays done, and shows it Becomes failed Disputed: a failure of that Agent

A later verdict replaces the earlier one while the run stands done or held. The verdict is kept on the run's Run record, so a retry starts clean and the failure stays with the Agent that ran it. M's holds and proposals read the same scorecard. It is audited as mission.verdict (target MISSION VERDICT, never the note) and goes on the timeline (kind verdict, action the verdict). The Mission's page and the board's runs show it.

Requiring a decision. A role that sets

[role.releaser]
purpose = "Cuts releases"
policy = "..."
require_approval_before_done = true          # default false

holds its Missions' done: a Run that ends done with no green ink request decided in that run, approved or refused, by a person or a class authorisation, leaves the Mission held with the reason no approval was decided instead. A request that expired was not decided. What a brief or a prompt says it will do cannot be read, so this is what can be enforced: the role that must ask, and did not.

A held Mission has no harness and its safe house is finished with the work kept. It holds no place in the Station's capacity, keeps its lease and brief, and waits for a person: a verdict settles it within a scheduler pass, and its brief is then filed with the outcome and the verdict. It cannot be resumed or retried while held; cancel abandons it. If its Station is lost, its Run is lost like any other's, and Recovery decides. Review Missions are never held. It counts as waiting on a person on the scorecard until the verdict.

Verifying

A Run saying it is done does not make its Mission done. A Mission of an Operation whose Run ends done is verifying: its work is kept, no harness runs, its brief stays claimed, and it holds no place in the Station's capacity. It leaves verifying only by a decision, and never by itself: not when it is old, and not when it declares nothing to check. Review and panel Missions and Missions with no Operation settle done as before.

Deliverables. What a Mission is to deliver is declared before the work, as text, kind or kind:target, by its role and by its brief:

Kind Target Read back by
branch a branch name; without one, the Mission's own branch git ls-remote of the remote, from the Mission's working directory or its Operation's checkout
commit_on BRANCH, or BRANCH@COMMIT the branch's tip, then its history (the branch is fetched); without a commit, the one the working directory is at
comment text a comment carries the linked tracker item read back by id, its latest comments
artifact a URL an HTTP GET, status only
approval optional: the kind of step the Mission's green ink requests: one approved and not withdrawn
file a path inside the working directory the file, when the work is on the Station's own disk
[role.releaser]
purpose = "Cuts releases"
policy = "..."
deliverables = ["branch", "commit_on:main", "approval"]
ai6ctl missions create --operation G --title "Fix the build" --prompt "..." \
  --deliverable branch --deliverable file:docs/report.md

The Station records the list on the run when it goes verifying (deliverables in the Mission's detail), the role's first, then the brief's, each once.

Probes. The Station provides the means to look and decides nothing about what it finds. Each probe reports found, missing (the place was read and the thing is not there, by name), unprobed (this Station cannot look: the work is on a Theater it does not reach, or no tracker item is linked) or failed (the look failed or ran out of time, so nothing is known). Each has its timeout in the Station's [probes] table (git_timeout, http_timeout, tracker_timeout, file_timeout), and what each found is kept on the run as evidence, oldest first, up to [registry.limits.runs] evidence_entries. A tracker probe works where the Station holds the tracker's credentials, and an artifact probe makes a request from the Station to the address the role or brief names.

The decision. The Operation's charge, its 00 Agent in charge, verifies and decides; an Operation with no charge leaves the decision to a person. A person with mission.verify on the Operation can always decide, and their decision replaces a charge's:

ai6ctl missions probe "$MISSION"                  # asks the Station to probe, waits, prints the findings
ai6ctl missions verify "$MISSION" done --reason "branch and approval are there"
ai6ctl missions verify "$MISSION" failed --reason "the work was never pushed"
ai6ctl missions verify "$MISSION" redispatch --reason "no branch on the remote" \
  --amend "Push the branch before you finish."

POST /v1/user/operations/{operation_id}/missions/{mission_id}/probe and .../verify (body {"decision": "done"|"redispatch"|"failed", "reason", "amendment"?}) are the routes. A decision needs its reason, is audited first (mission.verify, target MISSION DECISION, never the reason), goes on the timeline (kind verify) and is refused with 409 unless the Mission's latest run is verifying. Its Station then settles the Mission within a scheduler pass:

Decision The Mission The run
done Becomes done Counts as done on the scorecard
failed Becomes failed Disputed: a failure of that Agent
redispatch Is queued as run N+1 of the same Mission, for the best qualified Agent, in the safe house the last run kept, with a new Run told the reason and the amendment after its brief Disputed: a failure of the Agent that ran it

The charge's decision takes this same path: it is audited (mission.verify, by charge:operation:CODENAME), recorded as the run's verdict, put on the timeline and counted on the scorecard, and a redispatch is a failure of the run's Agent. A charge whose clearance has been lowered to desk only recommends: the recommendation is audited (mission.recommend) and shown as recommendation in the Mission's detail and by ai6ctl missions probe, settles nothing, and a person confirms it by deciding the same way. A charge never replaces a decision a person has given.

The decision turn reads the deliverables back: a charge's done first has any declared deliverable it has not seen found read now, and one that is missing (a branch never pushed, an approval for a step nobody asked green ink for) or whose look failed holds the Mission. The decision is refused as "held, not passed" naming each, the Mission stays verifying, and the charge can redispatch or fail it, or leave it to a person. A kind this Station cannot look at does not hold it.

A person who gives a verdict on a verifying Mission with ai6ctl missions verdict settles it the same way as confirmed or failed-verification; only verify redispatches. A standing order whose run is verifying waits for the decision like one that is held: its next window does not fire over it.

Green ink

Before an irreversible step (a push to a protected branch or tag, a merge, a release, a deletion, a change of clearance) an Agent asks for green ink: a person's recorded approval of exactly that step. (M files the clearance requests itself, to promote an Agent; see Track record and promotion.) It calls request_approval on its Run's AI6 tool endpoint with the kind of step, its target (for a push, REMOTE:REF such as origin:refs/heads/main), a reason and a retry key, and optionally links: up to 8 {label, url} pairs naming what the request is about, each an https address with no credentials ([registry.limits.approvals] links, link_label_bytes, link_url_bytes). It is answered at once:

Status Meaning
not_required The Operation's green ink policy lets this Agent's clearance take the step.
approved A live class authorisation covers it, or a person already signed it; expires_at says until when.
pending A person decides. The Mission is blocked with reason green-ink until then.
rejected, expired Do not take the step. A request nobody decides within 24 hours (request_ttl_secs) expires as refused, and is kept where a person can re-arm it.

An incident is one Mission's failure chain. While a green ink request is open, later asks on that Mission return pending with the first request's ID, including asks from later Runs. The ruling covers the requested step. Once the decision is in, the Agent can ask for a different step. The Mission's route waits while a person has the decision. A standing sleeper shows paused: decision ID is open on its waiting window. A tracker comment that would reopen a settled Source Mission is kept for when its route can run again. Other Missions, including those using the same Agent, continue on their own routes.

With coalesce = "step", requests group by the Operation, kind and target. For example, tag v1.2.0, refs/tags/v1.2.0 and origin:refs/tags/v1.2.0 name one release. A push names its remote only if both do. A live approval can answer a repeat request for its step. A rejection stands for its step until an operator reopens it. Asking again returns rejected with the signer's note and request ID. An Operation refuses steps on its deny list and requires a person to decide steps on its park list.

The gate files for the Agent. A command the harness gate holds because no approval covers its step is filed as a request on the Agent's behalf (its reason says the gate filed it), and the hold names the request. When it cannot be filed the hold says so and why, so a denied step always leaves either a request or a stated failure. The Station journals a line for every gate decision (the Operation, Mission, step and what became of it) and for each approval that lapses unused.

While a request is pending the Mission's Watchdog is paused: waiting for a person is not a stall, and terminal output or an operator message does not end the wait. If the Agent's turn ends meanwhile, the Run closes and the Mission stays blocked.

An operator with approval.decide on the Operation sees the waiting steps on Outer Office's Green Ink page, or from GET /v1/user/operations/{operation_id}/green-ink, and approves one for a chosen time (one hour unless chosen), rejects it with a reason, sends it back for rework (POST .../green-ink/{request_id}/rework with {"note"}), or talks it over (POST .../green-ink/{request_id}/say with {"text"}). The signer is always the signed-in person. The Station holding the Mission tells the Agent the outcome, the step and the expiry (in a message to its live Run, or by resuming the Run with it), and the Mission is working again once nothing it asked for is pending.

Rework, talk it over, options, forms and ask_person. A request tracks its revision (starting at 1), earlier revisions, a thread of rework/say/reply messages bounded by [registry.limits.approvals] thread_bytes (64 KiB), and who it is awaiting (person or agent):

  • Sending rework or say hands the turn to the Agent (awaiting = "agent"), leaves the request out of the attention list until the Agent responds, and resumes the Run with the person's message. The Agent replies through approval_reply or submits an updated ask via request_approval with revises pointing at the waiting request ID (revision increments, the prior wording moves into earlier, and Outer Office shows a diff).
  • An Agent can offer up to [registry.limits.approvals] options (5) bounded step options (id, label, target, optional detail Markdown) on request_approval. Every option's scope is checked against the Operation policy (deny, park, clearance, class authorisations), and an approval names which option is authorized so only that target is covered (POST .../approve with {"option"} or ai6ctl green-ink approve --option).
  • An Agent can attach a JSON Schema form (up to [registry.limits.approvals] form_fields, 32 fields) to request_approval or ask a non-authorizing question with ask_person (kind = "question", question = true, title, form). Schemas that mark fields x-sensitive or writeOnly are refused and pointed to secret_request. Answers are checked against the schema before auditing or recording. ask_person questions are readable and answerable by anyone with mission.read via GET /v1/user/operations/{operation_id}/green-ink/questions and POST .../green-ink/{request_id}/answer (or approve / answer with approval.decide on step forms). An external ACP agent's elicitation/create (form mode) routes through the same ask_person path.

An approval belongs to the Mission, not to the Run that asked: a later Run or window of the same Mission is covered by it while it lasts. How long, when the signer does not choose, is the Operation's approval_ttl_secs (one hour by default); a standing Mission whose windows are further apart needs a longer one. An approval that lapses with no step ever taken under it is filed as a Report of the Operation (kind green_ink), so it reaches the attention list.

A request an Agent files through the issue tools (issue_comment, issue_request_info, issue_update) carries the reason it gave; without one it says what the step is (the comment text, or what the update closes, reopens, moves or assigns). The clearance requests M files to promote an Agent are Markdown briefs with frontmatter: who is put up for what, the record against each threshold as a table, what the grant is bounded by and what refusing does.

The Green Ink page renders a reason as Markdown and links what it names to the Operation's Sources: a Jira key of a configured project, #12 or owner/name#12, a commit SHA, refs/heads/x and branch x. GET .../green-ink/sources says where those are read (each GitHub or GitLab instance's page, each Jira site and project, nothing not served over https). The app only forms the address; it asks the tracker nothing, so such a link may lead to a page that does not exist. These open at once, and so does a link the Agent gave to one of those hosts; any other shows its full address first.

curl -f -X POST "$UNEX_URL/v1/user/operations/G/green-ink/$REQUEST_ID/approve" \
  -H "authorization: Bearer $UNEX_ACCESS_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"expires_in_secs": 1800, "note": "Push the release branch only."}'

A class authorisation approves a kind of step in advance: step kinds, a target glob (origin:refs/heads/ai6/*), the Agents (* for any) or roles it covers, the lowest clearance, an optional use limit and an expiry. A matching request is approved at once and the use is counted and audited as class_authorization.used by class:<id>. A Run that has read untrusted input never uses one under the default exposure policy (the approvals restriction, see Exposure). Operators with approval.class grant, list and revoke them from /v1/user/operations/{operation_id}/class-authorizations or Outer Office's Class authorisations tab.

A class authorisation of kind proposal lets M promote Agents' Mission proposals without asking: its target pattern is matched against the proposal's title, its Agents against the proposing Agent and its roles against the role the proposing Run's own Mission was given (recorded with the proposal, never the proposal's word for it). A proposal that asks for a role must ask for that same role or one the class authorisation lists in proposed_roles. Headquarters vets each pending proposal (the vetting rules other than the hourly rate, then the Chief of Staff's review when the Operation has one) and shows the result in the proposal inbox. A proposal whose vetting found nothing is promoted when such a class authorisation covers it, once it is 30 seconds old (so the proposing Run's last tool results have reached the Registry) and only if its Run had not read untrusted input: neither the proposal's own mark nor, under an Operation that restricts proposals, the parent Mission's Run records may show an exposure. One use is counted and the approval is audited as mission.proposal.approved by class:<id>. Every other proposal waits for an operator, as before; none is runnable before it is promoted. A promotion, by a class authorisation or an operator, clears the promoted brief in the same Registry step: of its review when reviewed as a proposal, and, for an operator's approval, of everything vetting found except a malformed brief.

An approval can be withdrawn before it expires (POST .../green-ink/{request_id}/revoke with an optional {"reason"}, kept on the record as revoked.note, or ai6ctl green-ink revoke); it then covers nothing, and a credential leased against it is revoked. Without the app, ai6ctl signs the same way:

ai6ctl green-ink list --operation G
ai6ctl green-ink approve "$REQUEST_ID" --operation G --expires-in 1800 --note "main only"
ai6ctl green-ink approve "$REQUEST_ID" --operation G --option staging
ai6ctl green-ink rework "$REQUEST_ID" --operation G --note "narrow to the staging branch"
ai6ctl green-ink say "$REQUEST_ID" --operation G "Why main instead of staging?"
ai6ctl green-ink answer "$REQUEST_ID" --operation G -f answers.toml
ai6ctl green-ink reject "$REQUEST_ID" --operation G --reason "not before the audit"
ai6ctl green-ink revoke "$REQUEST_ID" --operation G --reason "wrong branch"
ai6ctl class-authorizations list --operation G
ai6ctl class-authorizations grant G push --target 'origin:refs/heads/ai6/*' --agent 007 --expires-in 86400 --max-uses 20
ai6ctl class-authorizations revoke "$CLASS_ID" --operation G

grant signs as the caller like approve does, always with an expiry (--expires-in, at most the gateway's green_ink_max_grant), and needs an --agent or a --role (* for any Agent); it is audited as class_authorization.created. answer -f accepts .toml, .json, .yaml/.yml, .cfg, or - for stdin (--format toml|json|yaml).

Every change is audited with the step it concerns (REQUEST_ID KIND TARGET, or a class authorisation's ID KINDS PATTERN), never the Agent's reason or form answers:

Action Actor When
green_ink.requested agent:<codename> An Agent's request or ask_person question is recorded and waits for a person
green_ink.rework, green_ink.message the person A person sends a request back for rework or talks it over with the Agent
green_ink.approved, green_ink.rejected, green_ink.answered the signer A person decides a step request or submits answers to ask_person
green_ink.revoked the person An approval is withdrawn
green_ink.expired expiry The Station tells the Agent a request expired undecided
green_ink.rearmed the person A request that expired undecided waits for a decision again
class_authorization.created, class_authorization.revoked the person A class authorisation is granted or withdrawn
class_authorization.used class:<id> A class authorisation approves a request

Expired requests

A request nobody decided in time counts as refused and leaves the inbox; it does not vanish. The Expired tab of the Green Ink page, GET .../green-ink/expired?since=UNIX and ai6ctl green-ink list --expired list those that expired since since, by default within [text] green_ink_expired_window (30 days), the newest first and at most [registry.limits.approvals] expired_listed (200). A request a person approved is not on it. The same tab lists the requests a person rejected (GET .../green-ink/rejected?since=UNIX, same window and bound) with a Reopen action: it calls the re-arm route, gated on approval.decide like the rest of the page, and the request waits for a decision again as the same request.

A person with approval.decide can re-arm one: POST .../green-ink/{request_id}/rearm with {"note"?, "expires_in_secs"?}, ai6ctl green-ink rearm REQUEST_ID --operation G [--note TEXT] [--expires-in SECONDS], or the tab's button. The same request is pending again until the new expiry, by default as long as it first waited, and decided like any other; approving it still needs what its kind needs. Only an expired, undecided request can be re-armed: one still waiting or one a person decided is 409.

The Station holding the Mission takes it up within a scheduler pass. A working Mission is blocked with reason green-ink again, and a live Run is told it waits again, having heard it expired. A Mission still waiting stays so, with no resume. One whose Run ended and which went on to end has nobody to tell: the approval is still recorded, and a retry of the Mission can use it.

What holds a step

Two things hold a step an Agent takes without green ink.

The harness gate turns a run into a request. Before Claude Code runs a shell command (a PreToolUse hook running ai6 green-ink gate), whenever Codex asks to run one (a gated Codex thread asks before every command it does not consider a safe read), and before the Station's own exec tool, or Codex's exec-server, runs a command on a remote-hands Theater, AI6 names the governed steps in it and asks the repository the command acts on what its refs and push settings mean:

  • each ref a git push updates, with the remote it goes to: refspecs as written (--force, +ref, heads/main, tag v1 included), --all, --tags, --follow-tags and --mirror as refs/heads/*, refs/tags/* and refs/*, and for a plain git push whatever remote.NAME.push, push.default and the branch's push remote say, -c on the command included;
  • each ref git push --delete or :ref removes;
  • gh pr merge NUMBER (with its -R OWNER/REPO), gh release create TAG, and gh api calls that merge a pull request.

It reads through shell keywords (if, do, {, !), wrappers (sudo, env, timeout, nice, nohup, …), sh -c, pwsh -Command, cmd /c, eval, iex and git aliases, and substitutions and here-documents, and follows cd, git -C and GIT_DIR to the right repository. A redirection (2>&1, > log) is neither an argument nor the end of the arguments. What it cannot read is held: a word only the shell can fill in (git push origin HEAD:$BRANCH), a quote that never closes, an encoded PowerShell command. It then asks the Station whether the Operation's policy and a live approval of the Mission cover each step. If not, the command is refused and the Agent is told the exact kind and target to pass to request_approval:

Green ink: it would push origin:refs/heads/main, which needs green ink: call
request_approval with kind "push" and target "origin:refs/heads/main", wait until it is
approved, then run the command again.

A push to a ref the Operation does not protect goes ahead; a destination with a pattern character (refs/heads/*ain) is always protected. An approval covers the same ref on the same remote however it was written (origin:main covers git push origin refs/heads/main), for as long as it lasts; an approval without a remote covers every remote. The gate holds what it cannot read rather than guess: a ref the repository cannot name, a directory it cannot follow (cd $DIR), arguments from xargs, gh api calls that move refs or releases, and any other command that runs git push or gh (find -exec, Start-Process). It is still best effort: arguments built at run time, gh aliases and other programs that push are not seen. An approval is not tied to one commit.

The credential is the guarantee. A loadout secret marked green_ink (say, the token that can push to main) reaches a Run only while the Mission holds a live approval of a kind and target it names, once per approval on any Station, and its lease is revoked as soon as the approval expires or is revoked (see Credentials). Credentials already on the Theater are outside that, which is why the Station reports them as weakenings.

Activity timeline

An operator with audit.read on an Operation reads what changed across it, newest first, from GET /v1/user/operations/{operation_id}/timeline or Outer Office's Timeline view:

Kind Recorded by What it says
lifecycle Universal Exports A Mission's state changed, on which Run and Station.
control Universal Exports A cancel, retry, resume or interrupt was applied, rejected or expired, and the state after.
cable the sending Station An Agent sent a Cable: sender, scope and recipient count.
sleeper the Registry, the Stations A Sleeper was authorized or revoked, and by whom; a window was skipped and why, or fired late; a run started or resumed its Run, run-failed or was superseded.
green_ink the Station An Agent asked for green ink (requested), or was told the decision (approved, rejected, expired): the step, its target and the request, and who signed.
audit Universal Exports Mission requests and controls, proposal decisions, Agent role, quarantine and Station settings changes.

Each item names its Station, Mission and Run where it has one, so the view filters by Mission (?mission=). It never holds a prompt, a resume message, a Cable's body or target, terminal bytes or a secret, and a Cable shows only in its sender's Operation; live terminal output stays on the Run's own stream. Pages hold at most 200 items and follow an opaque cursor; activity arriving meanwhile goes on top without shifting older pages. The Registry keeps the newest 10,000 activity events.

Run context

When a Mission's Run ends, the Station files what the agent was given and did, as its harness kept it, in the Registry: the Run's context. It asks the Run's handler where its harness keeps the Run (AgentHandler::run_record) and reads that file: Claude Code's transcript (claude-code-jsonl, projects/*/<run>.jsonl under CLAUDE_CONFIG_DIR or ~/.claude), Codex's rollout (codex-rollout-jsonl, runs/*/*/*/rollout-*-<thread>.jsonl under CODEX_HOME or ~/.codex), or the Antigravity CLI's transcript (antigravity-jsonl, ~/.gemini/antigravity-cli/brain/<conversation>/transcript.jsonl). A handler that names none, such as acp, a file that cannot be read, and a harness a runner supervises on another host get the events the Station saw instead (ai6-events-jsonl, one {at, kind, text, tools, usage, data} per line), and the record says so (source: harness or events). Moneypenny's Runs are filed the same way after each of her turns and when her harness closes.

A context keeps its newest 8 MiB, from a line start, and records how large it was (cut_from); the Registry keeps 2,000 of them, the oldest filed going first ([registry.limits.contexts] context_bytes, records). One is filed again in place of the last for the same Run.

GET /v1/user/operations/{operation_id}/runs/{run_id}/context answers {run, owner, station, handler, format, source, filed_at, cut_from?, bytes, content} with run.context on the Operation, and each read is audited (run.context.read, resource mission:<uid>). A Run of another Operation, or with no context, answers 404. Outer Office shows it in the Context tab of a Run's page: the turns, each tool call and its result folded, and Download for the file as kept.

Run ledger

Beside the harness's own context, the Station keeps each Mission's Run ledger in the Registry while its Runs run: every prompt it sent and every event it read, in the standard history format (coqui-acp-history, JSON Lines). A Mission has one ledger across its Runs; a line's _meta (dev.coqui.ai6/run) names the Run it belongs to. It is written in batches ([ledger] batch_lines, 32, or batch_wait, 2 seconds), so a Station killed mid-turn leaves the ledger up to its last batch, and a Station that takes the Mission up again continues it.

A tool call is kept as the handler's event reports it, by the tool's name; its input stays in the harness's own context. A compaction the harness reports is a boundary line, with the summary when the handler's event carries one.

The values of the secrets the Station issued to the Run (its environment, at least [secrets] min_matched_bytes long) are replaced in the ledger and the header records how many ([ledger] redact_issued_secrets, on). Turning it off keeps them as the Run saw them and the Station reports a weakening at start. Nothing else is altered.

The ledger keeps its newest 64 MiB, dropping the oldest whole turns, and the Registry 2,000 of them ([registry.limits.ledgers] ledger_bytes, ledgers; line_bytes bounds one line, which a longer line replaces with a note saying so). ai6ctl ledger context MISSION --operation OP prints the current context (the latest compaction summary and what follows it), --full every line, and ai6ctl ledger export MISSION --operation OP -o FILE writes the history file. The route is GET /v1/user/operations/{operation_id}/missions/{mission_id}/ledger[?view=full], with run.context on the Operation, audited run.ledger.read.

Attaching to a Mission's Run

A person with mission.control on a Mission's Operation can attach to its live Run the way they can to a charge's: history, then the live stream, typing into the Run as its user, answering what it asks and interrupting it, with others attached at once. The hello frame of GET /v1/socket/attach names the Mission, {"type":"hello","token":ACCESS_TOKEN,"mission": {"operation":"G","mission":"mission-007"}}, and the gateway sends the request to the Station holding the Mission's newest open Run. The Operation is the Registry's (the Run's record, else the Mission's filed brief), never the hello's: a hello naming another, or a Mission the Registry cannot place, is refused no_run. Attaching, detaching, each prompt, answer and interrupt are audited (mission.attach, mission.detach, mission.prompt, mission.answer, mission.interrupt). A typed line takes the path a message to the Run takes elsewhere, and an interrupt is the Mission's interrupt above (it waits, blocked with reason interrupted, until resumed). A Mission whose Run has ended has nothing to attach to. ai6ctl mission attach is the line-based client; a pty Run's terminal view is the Run view as before.

File-backed intake

The Registry defaults to registry in the Station's state directory and can be named with ai6.cfg's [registry] location or ai6 serve --registry, which also take a SQLite or PostgreSQL database (Stations). In a directory, briefs in new/ are claimed atomically and filed under claimed/, then done/ or failed/; in a database the same states are rows of ai6_briefs. The stable brief identity combines its source and external record ID. User-supplied integrations can write validated brief JSON into a directory Registry's new/ or call the Universal Exports API.

Provenance

Every Mission records where its brief came from, its provenance (bona fides): AI6 sets it where the brief enters, from what it authenticated there, and keeps it apart from the brief record (in a directory Registry, provenance/KEY.json; in a database, a column), so a provenance field written into a brief file or row is never read.

origin Who asked (principal) reference Set by
operator the person, from the gateway's Directory Universal Exports (POST .../missions)
source the Source provider (github) the item; item_url its link the Headquarters Station's poll
sleeper the sleeper's name its definition's fingerprint the Headquarters Station
proposal the proposing Agent its Run the approval (universal-exports)
review nobody the review's identity the Headquarters Station, for a Chief of Staff review
registry_drop nobody the Station that took the brief

Each also carries received_by, received_at (Unix seconds) and digest, the sha256:HEX of the brief record as stored (canonical JSON without the provenance, and without the Mission ID and handle the Registry gives it): a brief changed in any other way after it was accepted, its Operation, assignment, Stations, link, data or text, loses its provenance; a rename does not. When a brief finishes, its provenance is spent: it moves beside the outcome (STATE/KEY.provenance, or the finished_provenance column), where only the CX report reads it, so the same record queued again is a registry_drop. A brief found in the queue with none, written there by hand or by an integration that did not go through AI6, is accepted as registry_drop: its Runs start exposed (brief:registry_drop, see Medical), and a finished brief named source:PROVIDER is reported to that Source only when it has a source provenance for it naming that provider and item, and its Operation is the one its Source data names. The Mission record, the gateway's Mission detail (brief.provenance) and Outer Office's Mission brief page show the origin. Anything that can write the Registry's own records can still forge them: the queue is the integration point this separates.

Distributed Registry placement is not implemented. A Run runs on its Station's host, or, for a Theater reached only through a transport, on the Station in remote-hands mode (see Theaters).

Recovery

Work should survive a refused quota, a lost lease and a Station that goes dark (the tradecraft word is extraction).

Run records and fencing

Besides the Station's own missions.json, every Run has a record in the shared Registry (runs/). It holds AI6's Run ID, the run's UID and its handle <mission handle>.<run> (distinct from the provider's), the provider ID, the Station that supervises it, its Theater, the run number and the ID of the Run it replaced, its exposure to untrusted input, its status (active, parked, ended or lost), how its harness was launched (handler, terminal, working directory, model, effort, mode and the runner's key), the last 20 things it was seen doing and its last safe-house checkpoint. Another Station that opens the same Registry sees the same records.

A Station acts on a Run only while it holds the record's lease, and every write presents the fencing token the lease was granted with. The token comes from the Headquarters election term and always grows past the previous holder's, so a Station that was paused, lost its lease and woke up again is refused: it closes its harness, abandons the Mission and leaves the safe house for the new holder. A live lease held by another Station also refuses a resume. The daemon renews its leases with each Station check-in (15 seconds; a lease lasts 60). A Mission started before records were shared gets a record the next time it resumes.

Station loss: adoption

When a Station goes dark its brief leases stop being renewed. Once a brief's lease and its Run's lease have both run out, the Headquarters Station decides what happens to the Mission (a brief whose Mission never started is simply queued again):

  • Adopted. The harness ran on a Theater's field runner, so it is still running. The Headquarters hands the brief's lease (same claim, same run) to a live Station that reaches that runner, placed as a new Run would be but only on that Theater and never on the dark Station. That Station takes the Run's lease with a larger fencing token, records the Mission as the dark Station launched it and re-attaches to the runner Run, receiving every event the dark Station did not take. Nothing is launched twice, and a parked Run resumes when its quota resets.
  • Lost. The harness ran on the dark Station's own host (Theater local), or with no runner, so it ended with the Station. Its record is marked lost with the reason, its fencing token moves on so the Station is refused if it comes back, and the brief is queued again for a new run. An Operation with on_lost = "fail" files the brief as lost instead. A brief that has already been tried three times is filed as lost either way.

Only Missions that came from a brief are recovered this way: a Mission created on one Station through its private API lives only in that Station's book.

Runner loss: the Station lives

A Station that cannot reach a Run's runner keeps waiting, since a dropped link costs only time: the runner spools what it misses. It does not wait forever. Once the runner has been out of reach for the Operation's lost_after_secs (45 seconds, three check-ins, unless set), the Station probes it once more through the Theater's transport. If the runner answers, the Station carries on reading where it stopped and the wait starts over. If the runner is gone, no longer has the Run, or the Theater cannot be reached, the Station gives the Run up:

  • it stops reading the harness and lets its Run lease lapse, so the record is marked lost with the reason (the last events it saw are kept for the hand-off);
  • it hands the brief back, which the Registry queues again as a new run, or files when the Operation says on_lost = "fail"; the Mission is abandoned in this Station's book, or failed when it came from no brief;
  • the Mission's events end with a lost event naming the reason.

A runner that restarts has lost the harnesses it supervised and says so with a lost event, which the Station handles the same way at once. A harness the detached wrapper runs without a runner is treated alike: out of reach for the grace, or quiet for it while its process is gone with no exit recorded, it is lost.

The same holds after a restart or an adoption. A Station that cannot re-attach to a Run tries again after 5 seconds, then 10, 20 and 40, and every minute after that; once its tries have failed for lost_after_secs, it probes the runner (or the Theater) and gives the Run up the same way when the probe fails too.

When the next run runs on the Theater the lost one ran on, its Station first ends the lost harness if the runner still has it, so the two never work side by side.

Lost Runs: a new run with a hand-off

The Station that takes the brief starts the Mission as run N+1, linked to the lost Run as its predecessor, with new AI6 and provider IDs (provider transcripts stay on the Theater that held them, so the Run cannot be resumed). The Agent is told about the run it continues:

This Mission continues run 1, which was lost: Station "alpha" went dark with Theater
"local"; its harness ran on that Station's own host.
Its work was last saved as commit 3f2a9c01d4e7 on branch mission-7-fix of origin; your
working directory starts from it. Inspect it before you continue: changes made after that
save are gone.
What it was last seen doing, oldest first:
- text: running the parser tests
- tool: Edit

The note is joined by the Mission's Run ledger (Run ledger): the new Run's initial context also holds the ledger's current context (the latest compaction summary and the turns after it, newest whole turns first when [ledger] seed_bytes is smaller than the history), replayed with every line quoted, so a history cannot pass for an instruction and no tool is run again. A note after it lists what did not carry over and, when the window left turns out, asks the Run to compact its conversation before it goes on. Because the Registry holds the ledger, a Station other than the one that lost the Run seeds it the same way. A Run that moves to another Agent's route, or that a person moves, is a new run of the same Mission and starts the same way. What was done goes on the Operation's timeline (ledger, seeded). [ledger] seed_new_runs off leaves the hand-off note alone; the Antigravity CLI has no writer for its transcript yet, so its Runs always do.

A Claude Code or Codex Run whose harness runs beside its handler on this host, working in its own way and in a home that may take a new transcript, does not get the replay: its handler writes the harness's own transcript from the ledger (Claude Code's project transcript, a Codex rollout) and starts by resuming it. What the ledger holds of a tool call is its title, so the transcript has the call by its name and none of its input or output. Only the part of the ledger that fits [ledger] seed_bytes is sent to the handler. The note after it lists what did not carry over. When the window left turns out and [ledger] compact_first is on (the default) and the Station does not start every conversation fresh ([harness] compaction = "fresh"), the Run is asked to compact as its first turn, with the harness's own command, and takes its brief once that is done. When that fails, or compact_first is off, or the handler cannot compact, the Run starts with its brief and a note to compact itself; the size it counts the history at is [ledger] bytes_per_token bytes to the token.

The replay is what every other Run gets: a harness on a Theater away from its handler, a Run in remote-hands mode (Codex is handed a Theater's environment only when a thread starts new, so a thread resumed from a transcript would run its commands on the Station), and a Run whose account's home is another person's config-dir login that the Mission's earlier Runs did not use (nothing is written into it). For the same reason a Codex Run in remote-hands mode is never resumed: a standing window starts a new Run, and says so on the timeline. A ledger is read only by a Run of the Operation it belongs to. A start that fails removes the transcript it wrote.

The work survives only if it was checkpointed. With workspace.settings.checkpoint_remote set (see Operations), the Station saves each running Run's safe house every checkpoint_secs: one commit on top of the branch's own commits that also holds the uncommitted changes, pushed to the Mission's branch on that remote, without touching the Agent's worktree, staging area or HEAD. The commit follows the Operation's cover (no Agent or model named, the cover's footer, the cover_identity as author). The next run's safe house is then a new worktree on that branch at that commit, so the git provider fetches it from the remote; a provider without history starts from the base. A run that works where the lost one did (the safe house its Station kept, or the same directory on the same Theater) is told to inspect the work it finds there instead. Otherwise the hand-off says the work could not be recovered.

The runs are on the Mission: GET /v1/missions and the Mission detail list each one's Station, Theater, status, why it was lost and the branch it was checkpointed to, and Outer Office shows them on the Mission card.

Provider limits: park and resume

A provider can refuse work until a quota resets (a five-hour or weekly window). The Claude and Codex AgentHandlers recognise that, read the reset time when the provider reports one, and end the turn with a limit event instead of completed or failed. The daemon then closes the harness and parks the Mission:

{ "state": "parked", "parked_until": 1790000015 }

parked_until is the reset time plus 15 seconds of grace, in Unix seconds. A Mission parked by a provider that gave no reset time waits the wait the refusal states, when it states one (a 429's retry-after, or words such as "try again in 90 seconds"), as it is; a time already past, or none at all, waits limit_fallback_secs (30 minutes by default) instead of retrying in a loop. The reset time wins over the stated wait, and the stated wait over the fallback. The safe house stays in place. When the time comes the daemon resumes the same Run and tells it to carry on; the Mission returns to working. Parking survives a daemon restart, and an operator can resume a parked Mission early with the ordinary resume request.

A reset time only says when to look first. A limit can lift early, or move later, so a Station reads the usage of a limited pool account again, with no model turn, on its own interval: room for the Mission's model frees the account and resumes the Missions parked on it at the next scheduler pass, hours before the time they were parked to; a reset the provider moved later parks them to the new time.

An Operation chooses the response with on_limit (settings):

  • rotate (the default, also for a Mission outside any Operation) first marks the Run's pool account limited until the reset and frees it. When another account of the Agent's pools has headroom, a Run whose history goes with it (Claude Code on an environment credential, moving to another environment credential) is parked only until the next scheduler pass and resumed, same Run, on that account; otherwise (a Codex or config-dir Run, or no environment account with headroom) it is queued again as a new run, told it continues an earlier one, and starts on the other account. The timeline records account / limited with the account, the reset and what happens next. A Run with no pool account, or whose pools have no account with headroom, parks as for wait.
  • wait parks as above.
  • backup posts the next qualified Agent, as Organization describes, among those whose handler differs from the limited one. The Mission is queued again for that Agent as a new run (a new Run record whose predecessor is the limited one), starting a new Run in the same safe house with a note that an earlier run stopped at a limit. With no such Agent available it parks instead.

The Outer Office board shows parked as a Run state, and the stream of Mission events carries the limit event.

The Headquarters Station also keeps a brief queued while every account of the pools its Agent would draw from is limited or at its max_concurrent, instead of starting a Run that cannot run. The reason ("no account with headroom in pools …", with the first reset when every account is limited) is recorded once on the Operation's timeline (account / waiting), and the brief is placed on the first pass after an account frees up. Outer Office's Account pools view and ai6ctl pools --operation <id> show each account's Runs, quota used, limit and tokens today (pool.read); an account's usage is read from its provider only when something asks (Reading usage again).

Budgets, exposure and quarantine

Medical adds three things to a Mission:

  • Usage. Tokens and cost reported by the provider are recorded per Run and Mission in the shared Registry, and GET /v1/operations/{operation_id}/missions/{mission_id} returns them as usage. A budget that is reached stops the Run and leaves the Mission blocked with blocked_reason: "budget"; raise the limit and resume.
  • Exposure. A Run that read a Source item, called a web tool or read a Cable from an exposed Run is marked on the board (exposure, shown as an EXPOSED chip in Outer Office) and, under the default strict policy, restricted. See Exposure. What the Mission's brief counts as exposing is read again when each Run launches, so a change to it reaches a standing Mission at its next Run; the value the Mission was made with stays recorded (minted_exposure), and a launch whose value differs from it is logged with both values. Sources a Run read itself are kept.
  • Quarantine. A Mission whose Agent is quarantined is quarantined: its safe house is kept, it is not resumed, and releasing the Agent returns it to the queue with the next qualified Agent. quarantined is a Run state in the board, ai6ctl and Outer Office.

Review

An Operation, a role or a brief can ask that a Mission's output is judged before it is done, by a panel of Agents on different models, with weights and rounds: Review.

Vetting and held briefs

Before M places a brief, the Station holding the Headquarters lease vets it under the Operation's vetting settings. The checks are deterministic and cost no tokens:

Check Applies to Finding
Size and visible text every brief malformed: the brief is refused
Same URL or title as queued, held or running work, other than another window of the same Sleeper every brief duplicate, naming that work
Untrusted briefs passed in the last hour, per Operation and per Source untrusted briefs rate
The Operation's spend today at operation_cost_usd_per_day every brief budget
Unicode tag characters (outside an emoji flag), bidirectional overrides and unbalanced embeddings or isolates, runs of zero-width characters, variation selectors or fillers, invisible operators, HTML comments outside the quoted item, lines that imitate the markers around quoted text, manipulation phrases untrusted briefs screening

Untrusted briefs are a Source's items, Agents' Mission proposals, and any brief whose provenance is missing or no longer matches it (a registry drop): their text was written outside AI6's operators. An operator's or a Sleeper's brief is trusted and is not screened or rate limited. Screening normalizes text before it looks for phrases: invisible characters are removed, so a phrase split by one is still found. A lone direction mark, an emoji's joiner or presentation selector, and a subdivision flag's tag letters are ordinary text and are not findings.

A brief with no finding passes and is placed as usual. A refused brief is filed as failed with outcome state refused (a Source still gets its CX report). Any other finding holds the brief: it leaves the queue for the Operation's held briefs, where no Station claims it, until an operator acts. Holding rather than refusing is deliberate: a real issue trips a check often enough that a person should decide. When the Operation has a qualified chief-of-staff Agent, an untrusted brief that passes the rules is also reviewed by it before it is placed (Chief of Staff); the review can only add a hold. The Operation's timeline records each decision as an intake event (passed, reviewing, cleared, held, refused, released) with the finding kinds, never the brief's text.

An operator with mission.create on the Operation reviews held briefs in Outer Office (Briefings → Held briefs), with ai6ctl held-briefs, or through the API. Listing needs mission.create as well, not mission.read: the list carries each brief's text on the wire, and a refused ai6ctl says so:

ai6ctl held-briefs list --operation G
ai6ctl held-briefs release source_jira--OPS-12 --operation G
ai6ctl held-briefs refuse source_jira--OPS-13 --operation G --reason "a mirror of OPS-12"

Each held brief lists its findings (duplicate: the same URL as other work (mission-41)); its text, which may carry what screening caught, is shown only on request and as plain text, with each character that renders as nothing shown by its code (<U+200B>) and a run of tag characters as the text it spells (<tags: ...>). A release returns it to the queue cleared of the kinds it was held for, so the same checks do not hold it again. A clearance, an operator's or a review's, is bound to the brief as the operator or reviewer read it (the digest of its record): a brief that changes afterwards, such as a Source item edited while its brief waits, is vetted and reviewed again. The clearance is kept apart from the brief, so a brief's own text cannot claim one. A refusal files it as failed with outcome state refused; a Source still gets its CX report, and the reason stays in the Registry. Both are audited (mission.brief.released, mission.brief.refused). Releasing or refusing again changes nothing; a brief already placed or finished can be neither (409). A held brief is never claimed, and a Source that polls its item again leaves it alone.

A brief held only for a rate limit returns to the queue on its own after the Operation's rate_hold_hours (24 by default) and is vetted again, so a burst does not leave work held for good; the timeline records it as requeued. An Operation holds at most 1,000 briefs; past that, a brief that would be held waits in the queue.

Sources

A Source is a Guatiao provider that polls a tracker or CI system for work: github (labeled issues and pull requests), gitlab (labeled issues, on gitlab.com or a self-managed instance) and jira (a JQL search). The same providers also serve the Tracker kind, which reads, comments on, labels and creates issues, so the outcome goes back through the tracker the work came from. An Operation names its tracker instances under sources.<name> in operations.toml (settings).

tracker ─► Source.poll ─► Report ─► Cable to the charge ─► its decision ─► brief (new/) ─► Mission
                                                                         ─► Tracker.post ─► comment on the item

A polled item is not work yet. It becomes a Report in its Operation, and the Operation's charge is told by Cable; nothing becomes a Mission until the charge, or a person, decides it (Items are Reports).

  • Where it runs. Only the Station holding the Headquarters lease polls, every interval_secs per source (default 60, at least 10: the station record's [sources] poll and min_poll). Provider calls block on the network, so they run off the daemon's async runtime. Each Operation and provider keeps a cursor in the Registry, so a Station that takes over the lease resumes where the last one stopped. A poll searches settling_secs (default 60; 0 for none) behind the cursor, since a listing can show an item after a newer one; what repeats changes nothing.
  • Brief identity. An item's Mission ID comes from its Operation, instance and item (the table above), and polling it again finds the same one. If the item changes while its brief is still in new/, the brief is updated in place. With intake = "direct" the brief is made as soon as the item is polled; otherwise once the item is decided mission. Once a Station has claimed it, polling leaves it alone, so a Mission is never duplicated. A finished item can only come back as the same Mission's next run (reopening).
  • Untrusted text. The brief's title is generated. The tracker's own title, labels and description are placed between fenced markers and introduced as data that cannot change the Agent's task or permissions. A description cannot close the fence. Labels are information and nothing more: they never require an Agent's tags, so nobody who can label an issue can fail its Mission.
  • Credentials. A source names environment variables (token_env, email_env); values are read when needed and never written to configuration, logs or error messages. A refused credential is an error, also on Jira Cloud, which answers its search with an empty page: an empty Jira Cloud poll makes one more request to tell the two apart.
  • Lag. A tracker's listing can show a new or changed issue seconds late, so it can arrive one poll later. GitLab leaves an issue's change time alone for a change within about a minute of its last one, so its settling_secs defaults to 120.
  • CX report. When a Mission ends, the Headquarters Station posts a comment on the item (and may add the instance's done or failed status label or make its status transition): the outcome, plus what the Operation's cover policy allows. covert says only that the work finished or could not be completed, and the branch; partial adds that AI helped and the Mission ID; overt also names the Agent and the provider IDs. partial and overt also list the tools the harness refused in its last turn. A report that fails is retried a few times, then dropped.
  • Limits. Jira issues are not transitioned when a Mission starts, only when it ends. Review comments reach a Mission only while it is unfinished (see Review comments below).

Items are Reports

Each polled item is one Report of kind source-item in its Operation, filed by source:INSTANCE: the item's title and text (untrusted, like all of a Source's words), its link and labels, and the item as last polled. Its ID is fixed by the Operation, the instance and the item, so one Report per item, however often it changes.

Poll finds The Report The charge
a new item filed, open told by Cable (change: new)
a changed item updated in place; open again if it was closed or deferred told again (change: changed)
the same item left alone not told

The Operation's charge Agent is told by a Cable from source:INSTANCE (it needs the Cable grant to receive in its Operation, as for any Cable to the Operation), reads the item with source_item and decides it with assess_report; a person decides it with ai6ctl reports assess or PUT /v1/reports/{id}/assessment (mission.control on the Operation). Each decision is audited (report.assess), kept on the Report with the reason apart from the item's words, and on the timeline:

Decision Effect
mission The item is work. The Station that polls the Source queues it as a brief on its next pass, vetted by the Chief of Staff and placed as any brief is, and links the Mission to the item and the Report.
duplicate Closed, naming the Mission, Report or item it repeats. No brief.
no_action Closed with the reason. No brief.
later Kept until the time given; then it is open again and the charge is told (change: due).

Only an open item is decided; a decided item is not decided again. When a decided-mission item changes, the queued brief follows it as it always has, and a settled one reopens as described below. An Operation with no charge Agent holds its items open for a person: nothing becomes a Mission by itself.

[operation.G] intake = "direct" keeps the older path, each item queued as a brief at once with no one deciding; it is a non-default, listed at start (ai6: Operation "G": intake = "direct" …) and at check-in (intake_non_default). The default is charge.

Reopening a settled item

An item whose Mission settled (its report was written on the item) is queued again, as the same Mission's next run (same UID and handle, a run <handle>.<run> after the last), when the instance's reopen says so:

reopen What reopens it
label (default) A poll finds the item with a label it did not have when AI6 last read it: the trigger label taken off and put back, or one added. The labels AI6 writes (status_labels) and those its Agents may touch (agent_labels) do not count.
comment As label, and also a comment AI6 did not write, by someone the tracker lets answer for the item (its author, a member, someone reply_authors names).
never Nothing: a settled item stays settled.

The run is briefed from the item as it reads now, and from the comments that reopened it, quoted as untrusted data as the item is. Nothing reopens while a run is queued, held or running. Each run has its own count of claims, so intake_runs bounds the lapses of that run alone, here and for a standing Sleeper's windows. Each reopen is audited (mission.reopened) and on the Operation's timeline (source, reopened, with the reason).

To see a label taken off, the Headquarters Station reads the newest settled items of each such instance again, at most [sources] reopen_watch (20) per instance every reopen_watch_every (300 s); each read is one request to the tracker. A label taken off and put back between two of those reads is not seen.

A Source's text is untrusted already. With comment, anyone the tracker lets answer for an item can start its work again with what they write, so comment is reported as a weakening at start and at check-in.

Deciding green ink from the tracker

A Source can let named people decide green ink where they already work, on the item a Mission is linked to. It is off unless the instance lists approvers, by the tracker's account ID (a GitHub or GitLab login, a Jira account ID):

[operation.G.sources.gh]
decisions = { approvers = ["alice-id"] }

A comment that is exactly /approve, or /reject followed by a reason, decides the request the Mission's Agent is waiting for. It is made as tracker:INSTANCE:ACCOUNT and shown on the request as its signer. Before anything is decided an audit record is written (green_ink.approved or green_ink.rejected, whose target names the request and the comment's ID), and if it cannot be written nothing is decided. The approval covers its step for approval_secs (decisions = { approvers = [...], approval_secs = 600 }), by default as long as an approval given in the app.

  • A command from an account that is not listed decides nothing. It is audited as green_ink.refused with its author and comment, and shows on the Mission's timeline as decision_refused.
  • With more than one request waiting for the Mission a bare comment cannot say which, so it decides none; a request to raise an Agent's clearance or to hold one needs agent.configure, which a comment cannot show, and is left for a person. Both are refused and audited the same way.
  • A command is never given to the Agent as a message, whoever wrote it. With no approvers listed the same text is an ordinary comment.

Listing approvers is reported as a weakening at start and at check-in, since whoever can sign in to the tracker as one of them can approve a step.

Linked issues

A Mission that started from an issue is linked to it, and keeps it current. A link names a tracker instance and an item (github:jose-pr/ai6#12, gitlab:group/project#12, jira:GUA-12), how the issue relates to the Mission (source, related, child, parent, mirror), who linked it, and whether it is in force (proposed, active, unlinked). The source issue is linked when its brief is queued, so the Mission's page can show it before it is placed. A Mission holds at most 32 links; an unlinked one stays as a record and a later poll does not bring it back.

Every write to a tracker is an outbox entry first: a Registry record any Station may queue, that only the Headquarters Station sends, because only it holds tracker tokens. An entry is pending, then sending under the election term that began it, then posted, refused or failed. A Headquarters Station that takes over finds what the last one left sending: a comment already on the issue (found by the entry's hidden marker, or the same text from AI6's own account) is recorded as posted, not posted twice; an entry that was not sent goes back to pending; a creation is refused, since sending it again could make a second issue. A failed send is retried with a doubling delay and fails after send_attempts; a refusal (a call the tracker cannot make, a bad value, an unlinked issue) is never retried. Each queue and settle is audited and appears on the timeline as an issue event, never with the text.

Review comments. Once a Mission's safe house has a Git branch, the Headquarters Station looks in each of the Operation's GitHub instances, at every reply_every, for the open pull request whose head is that branch, and links it to the Mission as related. The branch is AI6's own name, so nothing about the pull request is stored. The instance's replies then include the line comments of the pull request's reviews (review_comments, default true), each with its file and line, and they are delivered as an issue's replies are: from someone allowed to answer (a GitHub owner, member or collaborator, someone reply_authors names, the pull request's author), fenced as untrusted data, to a running Run or by a resume. The Run is marked exposed as review. A comment by the Operation's cover_identity name, and by the token's own login unless ignore_own_review_comments = false, is skipped as the Agent's own. A Mission that has ended is no longer looked at and hears no review comment; GitLab merge requests are not read.

Waiting on the issue. An Agent that needs more data asks with issue_request_info: the question is an outbox entry like any other, the Mission becomes blocked with reason issue, and its Watchdog pauses. The Headquarters Station reads new comments on the source, related and child issues of unfinished Missions every reply_every (60 s), cursor per tracker instance in the Registry. A comment is delivered only from someone allowed to answer for the issue: the issue's author or reporter, a GitHub owner, member or collaborator, a GitLab project member at the instance's reply_min_access (Developer) or above, a Jira assignee, or a login in the instance's reply_authors. AI6's own comments are skipped, told by the mark AI6 leaves on what it writes (a hidden <!-- ai6:… --> on GitHub and GitLab, the comment property dev.coqui.ai6 on Jira) and never by their author, so one person's token works: that person's own reply is delivered like anyone's. Any other author is a timeline event naming them, never their text. The Station that holds the Mission delivers a permitted reply as untrusted text in the same fence as an issue's body: a message to a live Run, a resume of one that ended its turn while it waited. A stalled, parked or quarantined Mission keeps the reply until it goes on; a queued or finished one is not told. The Run is marked exposed (issue:TRACKER), which a later run inherits. One question per issue may be open. Nobody answering within reply_ttl_secs (3 days) resumes the Agent told so (on_timeout = "resume"), fails the Mission ("fail") or keeps waiting ("wait"); an operator who resumes or stops the Mission withdraws the question.

An Agent's close, reopen or assignee change, and a transition the instance does not list, wait for green ink (kinds issue-close and issue-assign, governed under strict; licensed lets 00 Agents close without asking). The entry waits held until its approval is decided: approved, it is sent; refused or expired, it is refused.

What the Station writes by itself follows the Operation's updates: by default one status comment on the source issue, posted when the Mission starts working and edited in place as it waits for input or is paused, at most once a minute, with the instance's status_labels swapped and its status_transitions made when the issue offers them (one it does not offer is a timeline event). It names the Mission's branch once it has one. When the Mission ends the report is a new comment, so people are notified. Every word follows the Operation's cover policy.

Creating, splitting and mirroring. An Agent asks for issues with issue_create, issue_split and issue_mirror; its text passes the same check as a comment, and it carries on without waiting. By default a person approves each request (create = "propose"), or a class authorisation issue-create approves one from an unexposed Run with no findings; create = "direct" is a weakening that lets field and 00 Agents create at once, except from an exposed Run, and create = "off" refuses them. A Mission may hold max_created (10) issues, those waiting included, an Operation's Agents max_created_per_day (50), and a split may go max_split_depth (2) levels below an issue a person made; past any of these the call is refused. A title equal to an open linked issue, or to one AI6 created in the Operation in the last 30 days, is a finding duplicate, which stops a class authorisation and never a person.

The Headquarters Station then creates what was approved through the outbox, ties each new issue to the Mission, and the Agent is told the outcome with the new keys, as soon as a Run of the Mission can hear it. A created issue never starts work: every intake label of the Operation's instances is stripped, and an Agent cannot add one later. The person who approves may tick mark ready (which needs mission.create too): the Headquarters Station then adds the labels in that person's name (audit issue.ready), and intake, vetting and the Chief of Staff decide what runs, as for any issue. When intake takes an issue AI6 created, its Mission is linked to the issue it was split from, read-only.

A child goes under its parent where the tracker can: a GitHub sub-issue; on GitLab a task under an issue (a task takes no children); on Jira Cloud a sub-task under a standard issue and a standard issue under an epic; on Server a sub-task. Where it cannot, the child names its parent in its first line and the parent gets one comment listing the children; a Jira child of a sub-task is created beside it and tied by link_type (Relates). A mirror copies the title (Jira cuts it to 255 bytes), the body as quoted text under a header naming the original, the labels the target has, and the priority through the target instance's priority_map. Assignees, the issue type, components, sprints, custom fields, attachments and comment history are not carried, and each dropped field is listed in the proposal and the result. The original gets a comment "Tracked in URL", and a remote link where the tracker has them; both sides stay linked to the Mission, and nothing is kept in sync afterwards.

People. Reading a Mission's links and posts needs mission.read. issue.link, issue.comment, issue.update and issue.create on the Operation let a person write, from Mission detail, ai6ctl or through Moneypenny's proposals, which they confirm:

ai6ctl mission issues m-12 --operation G
ai6ctl issues comment github:jose-pr/ai6#12 --mission m-12 --operation G --body "Use the release branch."
ai6ctl issues link jira:GUA-7 --mission m-12 --operation G --relation related
ai6ctl issue-proposals list --operation G
ai6ctl issue-proposals show ip-1 --operation G
ai6ctl issue-proposals approve ip-1 --operation G --mark-ready

No route calls a tracker: each writes records the Headquarters Station sends. A person's writes go out under the Operation's token, with a footer naming them, and need no green ink: their action is the permission. Their text is refused for a token shape or invisible characters, and keeps its links and mentions. A comment on an issue with an open question is its answer, as an operator's text: the Mission resumes, unexposed. A link a person makes is read once by the Headquarters Station; a foreign or missing issue comes back unlinked, with the reason on the entry.

Sleepers

A Sleeper is a standing order: a brief that queues itself on a schedule, such as a nightly dependency update. It is configured on the Operation and does nothing until an operator approves it.

[operation.G.sleepers.nightly-deps]
schedule = "0 3 * * *"   # minute hour day-of-month month day-of-week, in UTC
title = "Update dependencies"
prompt = "Update the lockfile, run the tests and keep the work on a branch."
role = "maintenance"      # optional: agent, role, priority, stations
ai6 sleeper list
ai6 sleeper authorize G nightly-deps
ai6 sleeper revoke G nightly-deps
ai6 sleeper fire G nightly-deps [--supersede]

Outer Office's Sleepers page, ai6ctl sleeper list|authorize|revoke|fire|disable|enable OPERATION NAME and Moneypenny's sleepers tool do the same through the gateway: no shell on a Station is needed.

  • Authorization. authorize approves the sleeper exactly as written. Editing its schedule, title, prompt or assignment withdraws the approval until it is authorized again. Windows at or before the approval never fire.
  • Disable and enable. ai6ctl sleeper disable G nightly-deps stops it minting briefs while keeping its definition and authorization; windows that pass are on the timeline as skipped ("disabled by an operator"), and authorizing it again keeps it stopped. ai6ctl sleeper enable G nightly-deps lets it mint again. Both need mission.control and are audited.
  • See what recurs. GET /v1/user/operations/{operation_id}/sleepers (mission.read) lists each Sleeper with what starts it (its schedule in UTC, or its on event), whether an operator has stopped it, whether its current definition is authorized, its next scheduled window, the last window that fired with its Mission and how that ended, and why the latest window has not fired when it has not. Outer Office shows it as the Sleepers page, with a Mission's Sleeper origin linking there.
  • Run it now. ai6 sleeper fire, ai6ctl sleeper fire and the page's Run now (POST .../sleepers/{name}/fire, mission.control, audited as sleeper.fire) run the Sleeper outside its schedule, as its current definition only and only while it is authorized: an edited or revoked one is refused, saying why. A stopped Sleeper may still be run by hand. A one-shot Sleeper makes a Mission for a manual window (manual-YYYYMMDDTHHMMSSZ, to the second), so the next scheduled window still fires. A standing Sleeper starts its next Run now; with a Run in flight it is refused, naming the Mission, unless supersede is set: the Station holding that Run then ends it as superseded (audited as sleeper.superseded, and not counted against its Agent) and the Headquarters Station fires the manual window. Superseding needs a Run a Station holds, and one request waits at a time.
  • Authorize and revoke from the gateway. POST .../sleepers/{name}/authorize approves the Sleeper as the roster defines it now, and .../revoke withdraws the approval (mission.control, audited as sleeper.authorize and sleeper.revoke).
  • One brief per window. The Station holding the Headquarters lease checks the clock every 20 seconds and queues the brief for the latest scheduled minute. The brief's key comes from the Operation, the sleeper and that minute, so a Station that takes over the lease after a failover finds the key already used (queued, running or finished) and queues nothing. A window more than 24 hours old is skipped rather than run late.
  • Prompt. The prompt is the operator's own text, not fenced as untrusted data.
  • An event instead of a schedule. on = "source:PROVIDER:EVENT" (and no schedule) makes it wait for an event a Source reports, such as source:github:check_failed: PROVIDER is a provider ID or the name of one of the Operation's sources, EVENT is what the provider calls it. A Source item the provider marks with that event fires the Sleeper instead of becoming a Report of its own, once for each revision of the item (the same item polled again fires nothing, a changed one fires again), by the same rules as a window: the brief's key comes from the item and its revision, a standing Sleeper runs one event at a time, and stations, agent and role apply. The brief names the event and the item's ID and quotes none of the item's own words. The trigger is part of the definition, so editing it withdraws the approval; an event that arrives while the Sleeper is unauthorized, stopped or still running is on the timeline as skipped with the reason and is not kept for later. No bundled provider reports an event yet.
  • Stations. stations = ["ID", ...] limits the sleeper's briefs to those Stations, as a brief's stations does: it narrows the Operation's list and never widens it.
  • A standing Mission. With standing = true the sleeper is one Mission, <operation>-<sleeper>-<n>, and each window is a new run of it: the run <handle>.<run> records the window it answers (window on its Run record), and the board and scorecards show one Mission with a run history. A window that comes while a run is queued, held or running does not fire; it fires when the run settles if it is still the latest window and within catch_up, and is on the timeline as skipped otherwise. With resume = true as well, a run resumes the last run's Run when that run ran on the same handler, did not fail, and its provider gave it an ID, and starts a new Run otherwise, as it does when the provider refuses the resume; the timeline says which (sleeper, resumed or started, with the window). resume without standing is refused when the roster loads.
  • A failed run. A failed run leaves the order standing: the next window fires as the next run, and the reason is in the run's outcome. The run of any Sleeper that fails is on the timeline (sleeper, run-failed, with the window and the reason, or a line saying the harness's words are in the outcome) and, with a Run, on the board (reason order-run-failed). It asks for no approval. Cancelling a run is not a failure, and leaves the order standing too; ai6 sleeper revoke stops it.
  • A stalled run. The Station holding a standing Mission's run looks at each check-in: when the order's next window has come and the run is stalled (past its Agent's stall_timeout), has no live Run on the Station and no re-attach that may still bring one back, or did not start, the window supersedes it. The run fails with that reason, its harness stopped, audited (sleeper.superseded) and on the timeline (sleeper, superseded), and the window fires as the next run. It is not charged to the Agent. A run waiting for a person (blocked with a reason), a provider's limit (parked) or an operator's release (quarantined) is left alone, and its windows are recorded as skipped.
  • A missed window. The latest window that has not fired fires once, late, while it is within [registry.limits.sleepers] catch_up: by default its own period, the time since the window before it; none keeps no limit. It is never more than one. Every other window that passes unfired is on the timeline when a later one comes (sleeper, skipped, with the window and why: not authorized, the scheduler was not running, the last run was in flight, no Station could take it, or older than its catch-up bound), up to skipped_events of them, the older ones as one event. A window before an order's first approval never fires and is not recorded. An edit withdraws the approval, and the approval given again may fire what the order missed once; a revoke ends what was owed.
  • Duplicates. A Sleeper's windows share its title, and are never held as duplicates of each other; a person's brief with the same title is still a duplicate of an open window.
  • Fingerprint. Every field the sleeper sets is part of what authorize approves, so adding stations, standing or resume withdraws the approval until it is given again; a sleeper that sets none of them keeps the approval it has.
  • Events. There is no event trigger; a CI failure or a new issue arrives through a Source.

Restart recovery and publication

AI6 persists the selected Agent, handler, terminal, working directory, model, effort, provider ID and cover settings for a started Mission. Environment values are not stored. On restart, the scheduler retries reattachment using the saved provider Run ID and verified Station safe house. A handler must return the same Run ID or AI6 refuses the resume.

A Station can publish lifecycle and terminal events to Universal Exports. When enabled, it consumes the gateway's authenticated input/resize queue and routes frames to the matching live Run. Set [unex] url and token in ai6.cfg; without a token the Station publishes nothing. Events use a bounded background worker and finite request timeouts, so a gateway outage does not block the Run. Terminal bytes remain binary.