Megastart
Put the agents you already use to work on one mission, from a failing project to a release you approve.
On this page
Megastart is a complete local application built on Chio: a host, a mission console, a sample project, and connections to the agents you already use. Its first mission turns a failing Rust project into a tested, reviewed release candidate.
Research reproduces the failure, implementation explores two repairs, and review tests the exact candidate before you approve it. Every worker acts under authority delegated from one mission grant, and every resource operation passes kernel admission and leaves a signed receipt. The host owns the files, processes, and isolation.
Build with your coding agent Read the brief
Paste the build prompt into your coding agent to adapt this system to your project. It covers the architecture, implementation steps, and the same acceptance checks as the walkthrough below.
Megastart: your agents, a system built on Chio
Inspect this project before choosing integration points. Build a local system that carries a repair mission through research, implementation, independent tests and review, and owner-approved publication. Use https://chio.computer/docs/megastart and its complete source download at https://chio.computer/examples/megastart.zip. The public kernel source is https://github.com/backbay-labs/chio. Use the pinned revision and Cargo.lock in the reference; do not invent APIs or CLI commands.
Start with the working host
Install the downloaded application with cargo install --locked --features native-agents --path ., then run megastart. The complete paired CLI release also exposes chio megastart. Do not assume an older installed CLI includes that command: inspect its help.
Use Apple Silicon macOS with the supported sandbox, Node.js 22.19 or newer, npm, Git, and Rust 1.94.1. In the console choose My native agents. Connect Claude Code, Hermes, Codex, or Pi, then use one agent for every role or mix agents. The terminal preparation command is megastart connect hermes (or claude / codex / pi). Preparation uses pinned public integrations; reuse their restricted launchers rather than inventing another adapter framework. Hermes installs a private managed Python runtime and independently locked agent and launcher environments.
Claude Code uses the existing Claude login; ask the operator to run claude auth login locally if needed. The managed host is pinned separately from the personal installation. Hermes, Codex, and Pi use the existing native ChatGPT login. If absent, ask the operator to run codex login locally. Never print, copy, or retain credentials in artifacts, prompts, worker environments, or recordings. Do not switch to API billing if authentication or account capacity fails. Preserve native agent identity.
Choose the supplied project or a directory containing lib.rs and tests.rs. Native sessions read source and identified handoffs, and write only their own output artifacts through Chio. The trusted host performs compilation and immutable regression tests. Do not fall back to unconfined execution. Keep the deterministic reference as a separate acceptance mode, available with the default feature set.
Preserve the architecture
Retain one mission coordinator, three swarm coordinators, and two workers per swarm. Research produces identified findings and failure evidence. Implementation explores separate candidates. Review independently runs immutable tests and assesses the exact candidate. Dependent stages wait for retained inputs.
The host owns credentials, executors, state, and isolation. Chio admits submitted operations under scoped worker authority. Workers share a single persistent 64-invocation allowance for native missions (six for the reference). Restarting must not mint a new budget. The reference uses one-hop grants from the mission authority. Coordinators schedule work; they do not extend the shared-budget delegation chain.
Build an operator experience
Use the mission service for both CLI and browser actions. Keep event identities stable across reconnects. Display real process and operation state; never simulate worker activity. A disconnected console must say it is disconnected. Keep progress, findings, test results, candidate source, review, and approval available without asking the user to read storage files or copy digests between commands.
Use megastart status, megastart review, and megastart resume for human operation. Keep status --json for automation. Approval must bind to the displayed candidate; changed bytes invalidate its publication decision. Noninteractive approval requires the explicitly inspected candidate digest.
Demonstrate refusal and recovery
Run megastart exercise in its separate reference mission. Also qualify the selected native agents on the same requirements; a reference run does not prove that a native host submitted a refused call. Demonstrate:
A native worker attempts a write outside its output grant, receives a signed refusal, and an independent resource check confirms no change.
Shared capacity is consumed across workers; an extra request produces no effect.
A real interrupted handoff resumes by verifying and reusing original receipts and effects, without repeating completed operations.
An unresolved operation stops for reconciliation rather than automatic replay.
Unapproved publication leaves no release; approval publishes the exact candidate.
Generated code cannot read host-only files, inherit credentials, or open network connections; candidate-local output remains possible.
Also complete an all-Hermes mission and Hermes-to-Codex-to-Pi handoffs. Retain mission, assignment, native session, bridge request, receipt, and artifact identity. A final agent message alone cannot establish completion: require verified delivery and a matching signed write receipt for the exact artifact.
Retain inspectable evidence
Export with megastart export. Verify with the reference verifier and a separately selected trusted public key. The package must exclude private keys, credentials, and the original database. Separate application observations from signed kernel decisions and independent resource checks. Do not claim completeness or trusted identity merely because signatures verify.
Report the result
Report the commands actually run, configured execution mode, mission outcome, source changes and test results, receipt and artifact locations, refusal and recovery results, publication decision, and unresolved failures. Identify any unsupported project layout or platform. Do not report a failed model call, compiler failure, or synthetic reference run as a successful model-driven repair.
Operate through Herdr
Chio is the modern Rust kernel for agentic operating systems. Herdr supplies the operator workspace; Megastart schedules assignments; existing native agents do the work; the host owns isolation and credentials. Keep these responsibilities visible in the architecture and in the actual implementation.
Build the included herdr/ Rust plugin and link its manifest with Herdr. Use its Open Chio mission action to start or attach the private host. Reuse the versioned operator state/events/actions, owner-only descriptor, shared allowance, and exact candidate approval. Never create an independent plugin quota or receipt signer.
The current panes observe restricted headless native sessions. Do not label them interactive agent terminals. Qualify PTY input/resize/interruption through the restricted launcher before offering that mode. Never register bare native resume commands or pass Herdr's control socket to workers.
Verify opening the same mission in the browser preserves its identity, allowance, receipts, and candidate. Close/reopen the terminal view without stopping the host or issuing replacement authority. On disconnection, disable actions and inspect retained state before retrying any unconfirmed mutation. Demonstrate a real Hermes-to-Codex-to-Pi handoff and clearly identify the separate refusal exercise. Finish with the reviewed candidate, trusted test evidence, exact local publication decision, and independently verified evidence package.
One grant delegates six scoped worker grants
The mission authority issues each worker its grant directly from the root, two per group. Coordinators schedule assignments; they do not extend the delegation chain. One allowance for the whole mission.
1. Bring up your mission console
Install the application once, then launch it by name. The example includes the host, console, sample project, locked dependencies, and acceptance tests. Prepare Git, a C toolchain, and Rust if you need them.
# Native sessions: Apple Silicon macOS, Node.js 22.19 or newer, and npm
chio new megastart --example megastart && cd megastart
cargo install --locked --features native-agents --path .
megastartThe host opens your browser and prints a reconnect address. Choose the supplied repair mission or a directory containing lib.rs and tests.rs, review the worker connection and shared invocation allowance, and start. Keep the host running; closing the browser does not stop the mission.
Private pipes connect the host’s local processes, and retained assignments and artifacts carry work across handoffs. When the Chio CLI and its companion ship together, chio megastart runs the same operator as megastart.
2. Choose the agent behind each role
Select “My native agents” in the console and connect an agent. One agent can fill all three roles, or you can mix agents by role. Megastart schedules assignments; each runs in the selected agent’s own runtime.
Native agents
- Claude Code
- Codex
- Hermes
- Pi
Workspace
- Herdr
megastart connect claude
megastartClaude Code uses your Claude login (claude auth login). Hermes, Codex, and Pi use your native ChatGPT login (codex login); Hermes keeps its own runtime, and its restricted transport uses that account for model requests. The launcher checks the login when work starts and never switches to API billing on its own.
Setup installs pinned public integration code privately and starts no model requests. Claude Code gets a pinned host and Hermes a managed Python runtime, with separate environments for the agent and its restricted launcher; your personal installations stay independent. A native session receives the mission’s tools and authority, never an existing conversation or personal plugins.
Try Hermes for research, Codex for implementation, and Pi for review. Every worker reads the approved source and its handoffs and writes its own output artifacts through Chio. The host checks those artifacts against signed receipts and verified delivery, then compiles and tests the candidate in its sandbox.
Direct model and reproducible reference modes
Direct model mode uses OPENAI_API_KEY, or CHIO_MODEL_PROVIDER=openrouter with OPENROUTER_API_KEY, and CHIO_MODEL selects the model. Credentials remain with the host, and generated code requires the macOS sandbox.
The deterministic reference runs on macOS or Linux; install it with cargo install --locked --path .. It exercises fixed repair strategies without model credentials, so its results establish reference behavior, not native-agent execution.
3. Follow the mission as it happens
The console displays retained mission events. Research produces findings, implementation explores its two repairs concurrently, and review waits for a passing candidate, reruns the tests, and evaluates its exact source. Select an event to inspect the assignment, the returned result, and the original kernel receipt.
The pixel formations reflect recorded worker activity. A disconnected browser says so, and reopening the console reconstructs the same mission and event identities. The recording follows a real native mission operated through Herdr: Hermes research hands off to Codex implementation and Pi review. It condenses the waiting, opens retained evidence, then opens the same mission in the browser with its candidate and allowance intact. Its approved result is a local release.
Select Hermes for research, Codex for implementation, and Pi for review in a system built on Chio.
Walkthrough transcript
- 0:00: Mission
Select Hermes for research, Codex for implementation, and Pi for review in a system built on Chio.
- 0:08: Research
Hermes investigates the failure. The board shows retained findings and native operations under Chio's shared authority.
- 0:18: Repair
Codex develops candidates. The host owns compilation and regression tests; the shared allowance tracks governed consumption.
- 0:28: Review
Inspect the original source, exact candidate, and retained review evidence. Native activity and original kernel records remain distinct.
- 0:44: Publication
The owner explicitly approves the displayed candidate. Its exact bytes are published locally, with the mission and receipts retained.
- 1:00: Same system
Open the same published mission in the browser. Its candidate, shared allowance, authority, and original outcomes match the Herdr view. Changing interfaces dispatches no work.
megastart statusStatus reports the stage, completed assignments, shared invocation allowance, and publication state. Add --json for the complete machine-readable snapshot. You never need to open the mission’s storage files to operate it.
Operate the mission from a Herdr workspace
The included Herdr workspace operates the same mission as the browser console: native agents do the work, Herdr provides the workspace, and Chio is the kernel beneath. With Megastart installed, build and register the plugin from the download, then open the mission.
# Requires Herdr 0.9.0 or newer
cd herdr
cargo build --release --locked
herdr plugin link .
herdr plugin action invoke chio.megastart.openThe last command is the “Open Chio mission” plugin action. During setup, keys 1, 2, and 3 cycle through Hermes, Codex, Pi, and Claude Code, so you can select all Hermes or mix agents by role. Prepare the connections, create the mission, and confirm its start.
The terminal board shows an activity view per role and Chio’s shared allowance. Press 2 for original operation records, 3 to review the exact candidate and test evidence, or b to open the mission in your browser. Assignments, receipts, and the publication decision stay with the mission.
The views follow real headless native sessions; interactive agent terminals are a separate integration path. Closing the board leaves the host running, and reopening the action reconnects. Actions require an active host connection, and publication requires explicit confirmation of the inspected candidate. Read the workspace controls and connection contract.
4. Every worker draws on one allowance
The mission authority delegates six scoped worker grants directly from the root grant, and each delegated token carries the root’s aggregate invocation budget. A native mission sets that budget to 64. The six assignments and the host’s checks draw on that one count.
Call 65 from review 1 is refused before dispatch: the family's 64 invocations are already consumed.
In Rust · mission.rs:35917 lines
fn capacity_observation(&self) -> Result<Option<Value>> {
// …
let family = verify_aggregate_invocation_budget(
&self.authority.root,
std::slice::from_ref(&self.host.signer),
None,
)?
.context("Mission has no aggregate family")?;
// … read the family's quota usage from the host's budget store
let consumed = usage
.captured_invocations
.checked_add(usage.reserved_invocations)
.context("Invocation accounting overflow")?;
Ok(Some(
json!({"remaining":family.max_invocations.saturating_sub(consumed),"total":family.max_invocations,"committed":usage.captured_invocations,"reserved":usage.reserved_invocations}),
))
}
Every admitted call lowers the remaining allowance by one, whichever assignment made it. A call counts as soon as it is admitted, so calls still in flight already appear in the count. An assignment that keeps retrying spends what the others would have used. Once the family has consumed its allowance, the kernel refuses the next call before dispatch.
A single SQLite admission authority enforces that ceiling atomically, so two workers cannot spend the same remaining invocation. Read-only operations consume the same allowance, and a dispatched operation that fails or is interrupted may also consume it. Count consumption from the ledger status reports, not from leftover artifacts.
The deterministic reference sets the allowance to six, which its six operations spend exactly. Its allowance drill then requests one more inspection that the worker’s grant permits.
megastart drill allowancerefused inspect: receipt=56b11ccca6b94b429d783208479ce2230980d098cbbf3f153410dc8c81df7903 allowance: protected file unchanged; no operation effect
You should see a signed refusal. The inspection is within the worker’s grant, but the family has no remaining capacity, so the kernel refuses it before the adapter records an effect.
Read more in Megastart reference.
5. Watch the boundaries refuse
Choose “Exercise the boundaries” in the console. Megastart creates a separate reference mission, interrupts it at a retained handoff, resumes it, then attempts a forbidden write, an over-budget operation, and publication without approval. The recording follows that isolated mission through Herdr.
The isolated reference exercise stops after four completed effects. This is a separate mission from the native repair.
Walkthrough transcript
- 0:00: Interruption
The isolated reference exercise stops after four completed effects. This is a separate mission from the native repair.
- 0:06: Recovery
Recovery verifies the original four effects remain unchanged and completes the two dependent operations.
- 0:12: Refusal
The exercise attempts unauthorized and over-allowance work. The retained checks confirm no additional completed effect.
- 0:18: Evidence
The completed exercise records the unchanged protected file, retained recovery outcomes, exhausted allowance, and refused publication without approval.
megastart exerciseThe exercise checks the protected file independently before and after the refusal, verifies that no extra adapter effect appears, and records its outcome in your console. It neither stops your working mission nor spends its allowance.
6. Resume interrupted work without repeating it
megastart resumeResume verifies the original receipt and retained effect before reusing a completed operation, and it preserves the consumed allowance. A request without a conclusive outcome stops for reconciliation, because the absence of a response is not permission to repeat an effect.
The deterministic reference carries the count across a process failure. With --crash-after-repair, its host exits with code 75 after four operations commit. Its last count before exiting is shared capacity: 2/6 remaining (4 committed, 0 reserved). Recovery reconciles those four from their original receipts without dispatching them, and status still reports shared capacity: 2/6 remaining (4 committed, 0 reserved). Only the remaining test and review run, leaving shared capacity: 0/6 remaining (6 committed, 0 reserved). Completed work consumes no new allowance.
Read more in Megastart reference.
7. Approve the exact candidate
Open “Review candidate” to compare the original and proposed source, inspect the test results and independent review, and authorize local publication. Approval binds to the candidate_sha256 of the displayed candidate, and the publisher rechecks those bytes before creating the release.
megastart reviewThe terminal offers the same decision with no digest to copy; noninteractive automation must supply the exact inspected candidate. Publication here creates a local release; an external deployment needs its own configured operation and authority.
Next: give it your project
Start with a Rust module and its tests. Keep the tests immutable, give workers only the operations they need, and preserve candidate identity through review and publication. Broader repositories need an adapter for their build and isolation requirements.
Export the retained evidence with megastart export. Another verifier can inspect it without the original database, using verify --trusted-key with a separately selected signer key. Read what verification establishes.