Kagex/Guides
CoW SyncSecurity & Zero-Trust · 5 min read

Reversible AI Edits: One-Way Host Sync, Diff, 3-Way Apply, and Undo

Even if an agent executes rm -rf /workspace inside its microVM, zero bytes change on your laptop. Verified edits return strictly through transactional backups.

Sync direction
Strictly Host -> VM (AF_VSOCK tar)
Host merge
git merge-file on temp files (index untouched)
Rollback
sandboxctl undo <artifact_id>
Review, merge, and roll back agent patches safely
sandboxctl exec "$ID" -- npm run lint -- --fix
sandboxctl diff "$ID"          # Inspect clean patch vs HEAD
sandboxctl apply "$ID"         # Prints: "undo with: sandboxctl undo art_..."
sandboxctl undo art_01J...     # Restores exact pre-apply host snapshot

Key Engineering Points · Ghost Secrets Vault & Zero-Leak Proxy

All 10 key points →
  • 1Real API tokens and credentials stay encrypted/stored solely on the host with 0600 permissions under daemon data roots.
  • 2Sandboxes receive only synthetic harmless placeholder tokens formatted as sbxph_<name>_<hex>.
  • 3Outbound HTTPS requests targeting approved secret hosts terminate TLS cleanly at a per-daemon ECDSA P-256 local CA proxy.
  • 4Host egress proxy swaps real credentials in transit strictly when both host allowlist and secret destination rules match.
  • 5Echoed secrets inside upstream HTTP response bodies or debug headers are redacted automatically back into placeholders via scrubReader.
  • 6Cleartext HTTP requests attempting to carry secret placeholders are dropped immediately before touching the wire.

Non-Destructive Git Tree Protection

Kagex never executes git commit, checkout, reset, or index mutations in your local repository. Three-way merges run on temporary files via git merge-file and verify symlink/traversal safety before writing.

Conflict Guard on Concurrent Host Edits

If you edited a file on your laptop while the agent modified the same file inside the VM, pull refuses to clobber your work unless explicitly merged or forced.

Inspect this architecture live in 3D

Step through MCP ingress, Ghost Secrets, CoW blades, and run sandboxctl commands interactively in your browser.

Frequently Asked Questions

Not at all. Guest filesystems sit in an isolated VM disk copy with no host folder mount.