arcbox
AGENTS.md4.3k starsChanged 4 months agoApache-2.0View on GitHub
ArcBox is a high-performance container and virtual machine runtime in Rust, targeting macOS (primary) and Linux. The goal is to surpass OrbStack on every metric. The project is in alpha. Breaking changes (internal or user-facing) are acceptable — always prioritize consistency, coherence, and long-term maintainability, even if that means large-scale rewrites. ¹ Host cost is the high-water mark of guest-touched pages, not the configured memory_mb: a fresh idle 16 GB VZ VM measured ~718MB of host phys_footprint (2026-08-01). On VZ…
- Reads credentials
- Installs packages
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
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository10 other files it gives its agents.
- app/AGENTS.mdAGENTS.md
- common/AGENTS.mdAGENTS.md
- computer/AGENTS.mdAGENTS.md
- engine/AGENTS.mdAGENTS.md
- guest/AGENTS.mdAGENTS.md
- rpc/AGENTS.mdAGENTS.md
- runtime/AGENTS.mdAGENTS.md
- virt/AGENTS.mdAGENTS.md
- xtask/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
21 rules. About 0 are common, 13 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 80
When a change touches files under a directory that has an AGENTS.md, read that file before editing — imported or not.
- Very specific: line 90
Run cargo clippy and cargo fmt before committing.
- Distinctive: line 91
All comments in English
- Distinctive: line 92
When behavior or public API changes, update related comments and documentation in the same change.
- Very specific: line 94
Use thiserror for crate-specific errors, anyhow in CLI/API layers
- Very specific: line 97
Prefer extension traits over free helper functions when the operation is specific to a type (e.g.
- Very specific: line 98
Prefer From/Into trait chains for error conversion.
- Distinctive: line 100
Prefer refactoring over layered, patchy fixes.
- Distinctive: line 101
No hacky workarounds. If a workaround is truly unavoidable, pause and get user approval first.
- Distinctive: line 102
When the right choice is obvious, make the decision — don't ask unnecessary questions.
- Distinctive: line 103
If a request appears to conflict with these guidelines, double-check intent with the user before proceeding.
- Distinctive: line 104
When project conventions or processes change, this file (AGENTS.md) must be updated promptly.
- Very specific: line 128
Every new file goes into the index in docs/README.md.
- Very specific: line 135
Commit messages: type(scope): summary (e.g.
- Distinctive: line 136
Keep each commit atomic — compilable, runnable.
- Distinctive: line 137
Commit along the way. Do not batch all changes into a single commit at the end.
- Very specific: line 138
Use cargo add / cargo remove for dependency changes, not manual Cargo.toml edits.
- Distinctive: line 164
Keep that token narrowed to this repo and to contents.
- Distinctive: line 185
All crates: MIT OR Apache-2.0
- Very specific: line 215
fallocate: Not available on macOS. Use ftruncate as fallback. - Distinctive: line 216
VirtIO batching: Not batching virtqueue pop/push causes excessive VM exits.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository Guidelines for Coding Agents
Project Overview
ArcBox is a high-performance container and virtual machine runtime in Rust, targeting macOS (primary) and Linux. The goal is to surpass OrbStack on every metric.
The project is in alpha. Breaking changes (internal or user-facing) are acceptable — always prioritize consistency, coherence, and long-term maintainability, even if that means large-scale rewrites.
Performance Targets
| Metric | Target | OrbStack |
| Cold boot | <1.5s | ~2s |
| Warm boot | <500ms | <1s |
| Idle memory | <150MB¹ | ~200MB |
| Idle CPU | <0.05% | <0.1% |
| File I/O | ≥100% of the best competitor guest² | 75-95% (vs native, their claim) |
| Network throughput | >50 Gbps | ~45 Gbps |
¹ Host cost is the high-water mark of guest-touched pages, not the
configured memory_mb: a fresh idle 16 GB VZ VM measured ~718MB of
host phys_footprint (2026-08-01). On VZ that mark is a one-way
ratchet — guest RAM lives in Apple's XPC process, out of the daemon's
reach — so the guest freeing 3GB leaves the host paying for it forever.
On HV the guest's free page reporting drains it back (measured
2026-09-25 on a 16 GB VM: 1.9 GB → 5.0 GB while the guest held 3 GiB
of tmpfs → 1.95 GB ten seconds after it freed it). The mechanism, and
the madvise dead ends, are in virt/arcbox-vmm/AGENTS.md
"Releasing guest RAM" and engine/arcbox-engine/src/vm_lifecycle/balloon/mod.rs.
² Same-context comparison (container vs container, same-day pairing).
Cache-hot native is not a valid denominator for FUSE metadata —
methodology and current numbers in docs/benchmarks/virtiofs.md.
Platform Priority
- P0: macOS Apple Silicon
- P1: macOS Intel
- P2: Linux x86_64/ARM64
Project Structure
common/— shared error types, constants, asset utilitiesvirt/— Virtualization.framework bindings, cross-platform hypervisor traits, VMM, VirtIO devices, VirtioFS, networking (NAT/DHCP/DNS)rpc/— protobuf definitions, gRPC services, vsock/unix transportruntime/— container state, OCI image/runtimeengine/— embeddable, daemon-free engine library (boot assets, machine images, VM/machine lifecycle, agent client; growing per the architecture charter in the company repo)computer/— agent-computer domain layer: transport-free sandbox protocols behind theSandboxHostseamapp/— core orchestration, API server, Docker Engine API compat, thin CLI (abctl, notarcbox), daemon binary (arcbox-daemon), facade crateguest/— in-VM agent (cross-compiled for Linux)tests/— test resources and fixture build scripts.agents/skills/— shared coding-agent skills (symlinked from.claude/skills/)docs/— engineering docs: reference guides at the top level, thenarchitecture/(designs),adr/(decisions),plans/,experiments/(question → method → verdict),benchmarks/(stable method, dated results),logs/(changes, investigations, incidents); layout, templates and the index indocs/README.md
Component Rules
Per-directory agent rules live in AGENTS.md files next to the code they
govern, and are imported here:
@virt/AGENTS.md @virt/arcbox-vmm/AGENTS.md @virt/arcbox-vz/AGENTS.md @virt/arcbox-virtio-blk/AGENTS.md @engine/AGENTS.md @computer/AGENTS.md @app/AGENTS.md @guest/AGENTS.md @rpc/AGENTS.md @common/AGENTS.md @runtime/AGENTS.md @tests/e2e/AGENTS.md @xtask/AGENTS.md
(common/arcbox-route/AGENTS.md is crate-local reference material and is
loaded on demand rather than imported.)
When a change touches files under a directory that has an AGENTS.md,
read that file before editing — imported or not. The set above is the
complete list; if you add a new AGENTS.md, add it here too.
Planning
When asked to plan, the plan must be fully resolved before implementation begins. Every decision must be locked — no "TBD", no "option A or B", no open questions. The plan should have exactly one possible outcome. If anything is unclear or uncertain, ask the user before finalizing.
Code Standards
- Run
cargo clippyandcargo fmtbefore committing. All code must pass both with zero warnings. - All comments in English
- When behavior or public API changes, update related comments and documentation in the same change.
unsafeblocks require// SAFETY:comments- Use
thiserrorfor crate-specific errors,anyhowin CLI/API layers - Hot paths: prefer lock-free /
RwLockoverArc<Mutex<T>>, use#[repr(C, align(64))]to avoid false sharing - Performance-critical paths (VirtioFS, network stack, VirtIO devices) are all custom-built, not vendored
- Prefer extension traits over free helper functions when the operation is specific to a type (e.g.
request.machine_id()?notextract_machine_id(&request)?;self.runtime.ready()?notget_runtime(&self.runtime)?). - Prefer
From/Intotrait chains for error conversion. Don't write manual mapping helpers likecore_to_status()— instead, implementFrom<LocalError> for ForeignType(using a crate-local error type to satisfy the orphan rule) and let.map_err(LocalError::from)?drive the conversion. - Section dividers (
// ===...) mean the file should be split. If you find or are about to add a// ====section divider, that is the signal that the file contains multiple distinct implementations and must be refactored into a module directory (foo/mod.rs+ one file per logical unit). Do not add new section dividers to keep a monolithic file — split immediately. Shared types and trait extensions go inmod.rs. - Prefer refactoring over layered, patchy fixes. Code changes must be coherent, not duct-taped on.
- No hacky workarounds. If a workaround is truly unavoidable, pause and get user approval first.
- When the right choice is obvious, make the decision — don't ask unnecessary questions. But when a plan or request is blocked or infeasible, surface the blocker with enough context for the user to decide the path forward.
- If a request appears to conflict with these guidelines, double-check intent with the user before proceeding.
- When project conventions or processes change, this file (
AGENTS.md) must be updated promptly. All changes to this file require human approval. It is the only root instruction file — there is noCLAUDE.md; Claude Code readsAGENTS.mddirectly and expands the@imports above.
Architecture Principles
- Resource ownership: each component manages its own resources. Servers own their sockets (remove-before-bind), the daemon owns its lock file. Never centralize cleanup of resources owned by other components — it creates ordering dependencies and race conditions.
- Daemon ↔ CLI contract:
arcbox-daemonandarcbox-clishare a contract viadaemon.lock(flock-based liveness) and socket paths. When changing daemon internals (lock mechanism, socket paths, startup protocol), always check and update the CLI's matching logic. - Daemon startup order is load-bearing: the 5-phase sequence (
init_early→acquire_lock→start_grpc→wait_for_resources→init_runtime) has specific ordering constraints. gRPC must start before slow phases so desktop clients can connect. The lock must be acquired before gRPC so the old daemon's sockets are freed. Changes to startup ordering require careful analysis of these dependencies. Seedocs/daemon-lifecycle.md.
Testing
- Tests are expected for code changes. Only test meaningful logic (branching, transformations, error handling). Don't test code that can only break if the language, runtime, or a dependency breaks.
Documentation
- Work that produced numbers or a verdict is recorded in the same commit
series, in the category
docs/README.mddefines: a question answered with data is adocs/experiments/YYYY-MM-DD-<slug>.mdentry; a measurement that will be repeated is a dated row indocs/benchmarks/<subject>.md; a change, root-cause hunt or incident is adocs/logs/YYYY-MM-DD-<slug>.mdentry. The probes behind the numbers are checked in undertests/bench/<name>/or as an e2e target so the entry can be rerun. Retiring a mechanism, choosing between designs, or setting a rule a later change must not undo silently gets an ADR indocs/adr/; the ADR cites the entries, it does not repeat their tables. Every new file goes into the index indocs/README.md.
Change Discipline
- Changes land on
masterdirectly. Work onmasteror on a localtype/short-descriptionbranch (e.g.feat/virtio-console,fix/dhcp-lease-expiry) that you fast-forward ontomasterwhen done, then push. A pull request is opt-in, for work that wants a review. The master ruleset still blocks force-pushes and branch deletion; the repository admin role bypasses its pull-request requirement, a contributor without that role goes through a PR. - CI runs after the push, so run its gates before every push to
master, cheapest first:cargo fmt --check,cargo clippy --workspace --exclude arcbox-agent -- -D warnings,cargo xtask check-layers,cargo test --workspace --exclude arcbox-agent, andxcrun swift-format lint --strict --parallel --recursive virt/arcbox-vz/shimwhen the VZ shim changed. The macOS workspace build, Clippy, and test commands excludearcbox-agent. Workspace formatting includes the guest agent. The LinuxUnit testsjob runs the guest agent's lib, bin, anddns_aliasestargets (.github/workflows/test-vm-linux.yml). When the guest agent changes, run Clippy foraarch64-unknown-linux-musllocally (guest/AGENTS.md). A change to the guest agent, the VMM, or the daemon's boot path also gets a daemon-level e2e run on the backend it touches (app/AGENTS.md"Validation ladder"). fleet/arcbox-fleet-proto/protois a vendored copy ofarcboxlabs/platform'sproto/public(BSR modulebuf.build/arcboxlabs/fleet);make fleet-proto-sync(buf export) overwrites it from the registry. Keep the copy byte-identical to platform's file. A fleet protocol change lands in this order: platform PR (itsproto.ymlrunsbuf breakingon the PR and publishes to the BSR on merge) → arcbox vendored copy + agent change. When the arcbox side must land first, copy platform's file by hand and do not runmake fleet-proto-syncuntil the platform PR has merged — the export would roll the copy back to the registry's previous version. Nothing checks the copy: CI'sbuf breakingjob coversfleet/arcbox-fleet-control-protoonly, and no job compares the vendored copy with the registry, so drift is silent. An additive change (new field, new oneof variant) is safe to ship agent-first: the gateway skips anAttachRequestwhose oneof it does not know (msg: None) and decodes an unknown field as absent.- Commit messages:
type(scope): summary(e.g.fix(net): correct checksum on fragmented packets). Do not add Co-Authored-By or "Generated by" lines — the master branch ruleset rejects commits whose messages match AI-attribution patterns. - Keep each commit atomic — compilable, runnable. Target ~200 lines changed (excluding generated files); hard limit 400. Don't make commits too small either — group related changes into one coherent commit unless that's all there is.
- Commit along the way. Do not batch all changes into a single commit at the end.
- Use
cargo add/cargo removefor dependency changes, not manual Cargo.toml edits. Check the lockfile diff afterwards:cargo addhas bumped unrelated crates andcargo removehas dropped an unrelated workspace dependency —git checkout Cargo.toml Cargo.lockandcargo checkre-adds only the intended edge. - When a PR is used: the ruleset requires every review thread to be resolved (0 approvals required; squash or rebase only — merge commits are disabled). Address or answer each bot/reviewer thread, resolve it (GraphQL
resolveReviewThreadif working from the CLI), then merge normally — do not reach for--admin. For stacked PRs, merge the base PR first — and expect GitHub to close the stacked PR when the base branch is deleted; recovery is: re-push the old base ref, reopen the PR, retarget it to master, delete the ref again, then close/reopen once more to trigger CI (pushes made while a PR is closed fire no events). - Review-bot findings (pullfrog/Codex/Greptile) get verified against the code first, then either fixed with a reply + thread resolution, or refuted with evidence in the reply. Never resolve a thread silently.
Releasing (the ordering is the contract)
A release runs: merge the release PR → release-please creates the tag and a
draft GitHub release → the tag push starts Release Build →
package-and-release attaches the tarball and then publishes → the
arcbox-desktop bump is announced. Each arrow is load-bearing; changing one
without the others reintroduces a failure already paid for.
- The release stays a draft until its assets exist.
release-please-config.jsonsetsdraft+force-tag-creation. v0.6.4 published the moment its tag was cut, its macOS build then timed out, and the assetless release sat at the top of the releases page — and told arcbox-desktop to bump to it, whose DMG build failed eight hours later on a missing protoc, three layers from the cause. force-tag-creationis not optional alongsidedraft. GitHub withholds the git tag for a draft release, andRelease Buildtriggers on tag pushes; without it nothing builds at all.draftbelongs on the root package only.fleet,sdk/typescriptandsdk/pythonpublish from other workflows and would sit as drafts forever. Their tags carry component prefixes, so they never triggerRelease Build.- Publishing uses the app token, not
GITHUB_TOKEN. A draft created by one integration cannot be modified by another — arcbox-desktop spent a release cycle discovering that as a 403 on the update, after finding the draft. Keep that token narrowed to this repo and to contents. update-desktopwaits for the assets and is not gated on the trigger.workflow_dispatchis how a half-finished release is recovered, which is the case that job exists for; gating onpushwould re-attach assets there and leave desktop un-bumped in silence. The guard that replaces it is a newest-release check, not a trigger check: the dispatchtagis free-form and flows straight into the bump, so recovering a superseded tag would propose moving desktop'sarcbox.versionbackwards. A redundant bump is cheap; a downgrade is not. Do not remove that check believing the worst case is a no-op.- The release cache is written from master, never from a tag. A tag cannot
read another tag's caches, so no release can warm the next one.
ci.ymlwritesmacOS-cargo-release-*;Release Buildrestores only, and must not fall back to CI'smacOS-cargo-debug cache — that fallback made the build look cached while it recompiled the whole graph. - A red release run is not evidence of a missing artifact, and green is not
evidence of a present one. Check
gh release view <tag> --json assetsbefore concluding anything about a release.
Licensing
- All crates: MIT OR Apache-2.0
macOS Development
- Virtualization.framework requires Developer ID signing after every build (ad-hoc
-s -will NOT work — restricted entitlements cause the binary to be killed on launch):codesign --force --options runtime \ --entitlements bundle/arcbox.entitlements \ -s "Developer ID Application: ArcBox, Inc. (422ACSY6Y5)" \ target/debug/arcbox-daemon - Requires Developer ID certificate (
.p12) + provisioning profile (.provisionprofile). SeeCONTRIBUTING.md"Code Signing" section for setup. - Requires Xcode Command Line Tools
- Some tasks require a running daemon. Start it in a background terminal:
abctl daemon start - Keep git worktrees outside the checkout. A worktree nested inside it (e.g.
.claude/worktrees/) makes cargo merge both.cargo/config.tomlfiles, and the duplicated-Wl,-rpath,/usr/lib/swiftmakes dyld refuse every host build script and test binary (duplicate LC_RPATH). If one must be nested, build from outside the tree with--manifest-path <wt>/Cargo.toml --config <wt>/.cargo/config.toml.
Guest Agent Cross-Compilation
The arcbox-agent crate runs inside Linux guest VMs and must be cross-compiled:
brew install FiloSottile/musl-cross/musl-cross
rustup target add aarch64-unknown-linux-musl
cargo build -p arcbox-agent --target aarch64-unknown-linux-musl --releasePlatform-Specific Pitfalls
- libc
mode_t:u16on macOS,u32on Linux. Always useu32::from(libc::S_IFMT)for cross-platform code. - xattr API: Parameter order differs between macOS and Linux. Implement separately with
#[cfg(target_os)]. fallocate: Not available on macOS. Useftruncateas fallback.- VirtIO batching: Not batching virtqueue pop/push causes excessive VM exits.
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.

