arcbox / runtime
AGENTS.md4.3k starsChanged 4 months agoApache-2.0View on GitHub
Two host-side, std-only model crates. No hypervisor, no guest memory, no virtqueue surface — none of the virt/AGENTS.md HV/e2e invariants apply here. - arcbox-container — domain types (Container, ContainerId, ContainerState) + exec orchestration primitives (ExecManager, ExecAgentConnection). - arcbox-oci — OCI runtime-spec v1.2.0 modeling: config.json (config/), bundle dir (bundle.rs), OCI state (state.rs), hooks (hooks.rs). This is NOT image/pull/layer code — there is no manifest, digest, layer, or tar-unpack anywhere in runtime/. Look for image bugs in the pull path elsewhere, not…
Trending
Quiet since September.thin dataabout the whole repository
Who's talking about arcboxlabs/arcbox
- A Hacker News story“ArcBox: From-Scratch Container Runtime for macOS in Rust (Docker, K8s, MicroVMs)”Hacker News · Jul 20, 2026 · 3 points
- @github-trending-rs.bsky.social“🚀 Skyrocketing! 🚀 (200+ new stars) 📦 arcboxlabs / arcbox ⭐ 3,352 (+360) 🗒 Rust Run AI agents on real …”Bluesky · Sep 6, 2026
- @githubprojects.bsky.social“arcboxlabs/arcbox Agents need powerful system access. Giving them your actual machine is the uncomfortable …”Bluesky · Sep 6, 2026
- @github-trending-rs.bsky.social“🎉 Celebrating! 🎉 (500+ new stars) 📦 arcboxlabs / arcbox ⭐ 2,448 (+506) 🗒 Rust Run AI agents on real and …”Bluesky · Sep 2, 2026
- 1Password/for-open-source“Application for ArcBox”GitHub · Apr 18, 2026
The biggest 5 of 6 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 6
Talked about on Bluesky, GitHub and Hacker News (6 times).
On Bluesky · 3
- Sep 6, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 arcboxlabs / arcbox ⭐ 3,352 (+360) 🗒 Rust Run AI agents on real and isolated machines — own… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Sep 6, 2026arcboxlabs/arcbox Agents need powerful system access. Giving them your actual machine is the uncomfortable part. ArcBox gives agents… — @githubprojects.bsky.social0 likes and reposts · 1 reply
- Sep 2, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 arcboxlabs / arcbox ⭐ 2,448 (+506) 🗒 Rust Run AI agents on real and isolated machines — own kernel,… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
On GitHub · 2
- Apr 18, 2026Application for ArcBox — 1Password/for-open-source0 reactions · 2 comments
- Mar 23, 2026feat: remove daemon plist log paths (companion to arcbox#99) — arcboxlabs/arcbox-desktop0 reactions
On Hacker News · 1
- Jul 20, 2026ArcBox: From-Scratch Container Runtime for macOS in Rust (Docker, K8s, MicroVMs)3 points
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- app/AGENTS.mdAGENTS.md
- common/AGENTS.mdAGENTS.md
- computer/AGENTS.mdAGENTS.md
- engine/AGENTS.mdAGENTS.md
- guest/AGENTS.mdAGENTS.md
- rpc/AGENTS.mdAGENTS.md
- virt/AGENTS.mdAGENTS.md
- xtask/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
Files
runtime/ — Container & OCI Model Agent Guidance
Two host-side, std-only model crates. No hypervisor, no guest memory, no
virtqueue surface — none of the virt/AGENTS.md HV/e2e invariants apply here.
arcbox-container— domain types (Container,ContainerId,ContainerState) + exec orchestration primitives (ExecManager,ExecAgentConnection).arcbox-oci— OCI runtime-spec v1.2.0 modeling:config.json(config/), bundle dir (bundle.rs), OCI state (state.rs), hooks (hooks.rs). This is NOT image/pull/layer code — there is no manifest, digest, layer, or tar-unpack anywhere inruntime/. Look for image bugs in the pull path elsewhere, not here.
Load-bearing wiring reality (read before "fixing container lifecycle")
- Neither crate is on the live container/exec path.
arcbox-ocihas zero workspace consumers (rg arcbox_ocioutside its own crate returns nothing).arcbox-container's only app reference is a commented-out re-export:// pub use arcbox_container as container;(app/arcbox/src/lib.rs:29). The running daemon's container + exec flow lives inapp/(Docker Engine API compat) and the guest agent. Editing these crates changes no daemon behavior until you also wire them in. WHY: prevents hours of "my change did nothing" debugging. Confirm withrg arcbox_oci/rg arcbox_containerbefore assuming impact. ExecManagerwith no agent returns a fakeexit_code: Some(0)(arcbox-container/src/exec.rs:294-302) — a test stub, not real exec. Real exec requires anExecAgentConnectionimpl (exec.rs:157).
Two same-named ContainerState — do not conflate
| Type | Semantics | Transitions |
arcbox-container::ContainerState (state.rs:47) | Docker-facing enum, 8 variants (Created/Starting/Running/Paused/Restarting/Exited/Removing/Dead) | NONE — no guard, any assignment allowed |
arcbox-oci::ContainerState (state.rs:213) — metadata struct, not an enum: #[serde(flatten)]s a State (state.rs:21) + timestamps/exit_code/name. The 4-variant status enum is Status (state.rs:118: Creating/Created/Running/Stopped) | OCI runtime-spec state carrier; no variants of its own | Validated on the embedded State via State::transition_to (state.rs:94) → Status::can_transition_to (state.rs:143); Stopped terminal; non-terminal -> Stopped on error |
The two enums do not map 1:1 (OCI has no Paused/Restarting/Dead). When wiring one to the other, state explicitly which side owns which surface; never silently unify them. WHY: wrong import / lost state distinctions.
Advertised-but-inert features (do not trust as working boundaries)
- OCI hooks are parsed and validated but NEVER executed.
hooks.rshas noCommand/spawn;HookContext(hooks.rs:176) andHookResult(hooks.rs:198) are inert data with no non-test consumer.Hooks::validateonly checks path-absolute + timeout>0. Adding real hooks means: add the spawn/executor path, feedHookContext::state_json()on stdin, AND add tests that assert a process actually ran — don't assume the types fire. Spec::validateis shallow (config/spec.rs:89): checks onlyociVersionnon-empty +>=2dotted segments,root.pathnon-empty,process.cwdnon-empty & absolute, and eachmounts[].destinationnon-empty & absolute. It does NOT validate namespaces, resources, seccomp, capabilities, or hook paths. Document what you rely on before treating it as a security boundary.
Conventions & pitfalls
- ID schemes differ — not interchangeable.
ContainerId::newstrips dashes and TRUNCATES to 12 chars (container/src/state.rs:16);ExecId::newstrips dashes, keeps full 32 (exec.rs:18);State::with_generated_idkeeps the full dashed 36-char UUID (oci/src/state.rs:59). config.rswas split intoconfig/(mod + one file per unit, commit03e81c0d). Per the root AGENTS.md section-divider rule, keep new spec types one-per-file — do not re-monolithize.- Guest-controlled numeric fields (limits, sizes from an untrusted spec)
must use checked arithmetic and cover near-
u64::MAXin tests — debug panics on overflow, release wraps past bounds checks.
Validation
Pure host-side unit tests, cheapest first:
cargo test -p arcbox-oci -p arcbox-container
cargo clippy -p arcbox-oci -p arcbox-container
cargo fmt -p arcbox-oci -p arcbox-containerThe HV/e2e ladders (hv_vmm, virtio_debug, ARCBOX_VM_BACKEND,
cargo xtask e2e) do NOT apply to changes scoped to runtime/ — running
them here is wasted effort. Integration tests live in
arcbox-oci/tests/integration.rs plus in-module #[cfg(test)] blocks.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

