Case study · 2026
PRIVATEDaypack
Governed sandbox execution and shared session memory for AI coding agents — agent commands run in Daytona or E2B cloud sandboxes, never silently on your machine.
- MCP tools
- 14
- Stack packs
- 9
- IDE integrations
- 6
- Test files
- 59
Role · Sole engineer — architecture, MCP server, provider layer, credential storage, release audit
Context
AI coding agents already write and run code. The uncomfortable part is where: on your workstation, with your credentials, your files and no memory between sessions. Every IDE builds its own silo, API keys end up in config files, and nobody can say where a command actually ran.
Daypack is the infrastructure answer: execution moves to isolated cloud sandboxes under an explicit policy, credentials move to the operating system keyring, and every connected IDE shares one project-scoped memory. It ships as a local MCP server — daypack-mcp — that Zed, Cursor, Claude Code, Codex, VS Code and Windsurf connect to over stdio.
The problem
Agents execute on your workstation
An agent can delete files, install packages or reach the network with your keys in the environment — and when a sandbox layer "usually" runs remotely, the exception is silent: the answer to where did this command run becomes unknowable exactly when it matters.
Credentials scatter across plaintext
Provider keys pasted into .env files, IDE configs and shell profiles live in every backup and sync target. One leak exposes all of them at once, and nothing records which key an execution used.
Every session starts from zero
Each IDE and agent rebuilds project context from scratch. Decisions made in one session — and the pending work it left behind — are invisible to the next one, so agents repeat work and contradict earlier conclusions.
Constraints
- Fail-closed execution: a request bound to a provider runs there or fails loudly — local execution is never a fallback (ADR-0002)
- Secrets never in plaintext: keyring entry, validate-before-store, redaction on every output path
- Billable and destructive actions are preview-then-confirm, with the approval token bound to the exact plan
- Typed errors with remediation — unsupported capabilities raise capability_not_supported, never faked
- The MCP surface is documented from the tool registry, generated, not maintained by hand
Decisions
The choices that carried most of the system. Each one lists the alternative that was on the table and the bill that came with the choice.
Execution location as an invariant: a provider-bound request runs in that sandbox or fails loudly (ADR-0002).
- Not this
- A local fallback — when the sandbox is unavailable, run the command on the local machine instead.
- Why
- The entire value is a provable answer to where did this command run. A silent fallback destroys that proof exactly when the sandbox is down — the moment provenance matters most. Fail-closed turns a provider outage into a loud error instead of silent provenance loss.
- The cost
- No sandbox means no execution: an outage blocks work instead of quietly degrading it, and agents must handle the failure explicitly.
OS keyring for all provider credentials, with a hidden entry prompt and validate-before-store.
- Not this
- Environment variables and .env files — the industry default.
- Why
- Files get committed, synced and leaked; the keyring (Windows Credential Manager, macOS Keychain, Linux Secret Service) never leaves the OS credential store. CI and headless machines get an explicit environment backend instead of a quiet plaintext fallback, and hygiene tests scan output, logs and generated IDE configs for secret material.
- The cost
- Headless setup is more ceremony, and keyring availability becomes a real support surface — daypack doctor reports the backend honestly.
Preview-then-confirm approval tokens bound to the exact plan digest for every billable or destructive action.
- Not this
- A single are-you-sure prompt, or trusting the model to ask before acting.
- Why
- The token binds approval to the exact parameters: what you approved is what runs. Sandbox create, governed deploy, sandbox delete and file upload all pass the same gate; memory deletion previews first and requires an explicit confirm.
- The cost
- Every governed action costs an extra round trip, and agents have to implement the two-phase flow correctly.
Session memory as append-only, redacted, size-capped event summaries with confirmed-only deletion.
- Not this
- A full transcript store per IDE — or no memory at all.
- Why
- Summaries, decisions and pending work are what the next session needs; transcripts are what leaks. One project-scoped store shared by all six IDEs replaces six silos, so an agent in Zed picks up where an agent in VS Code stopped.
- The cost
- Memory is only as good as the checkpoints agents write, and recall is bounded rather than exhaustive.
How it is put together
- Surface
- daypack-mcp: a local MCP server over stdio (speaks 2025-06-18 and 2024-11-05). daypack ide install wires an IDE in with a surgical, backed-up, atomic config merge.
- Governance
- daypack.yml v2 carries the project context: provider profile, command policy — an authorization rule, explicitly not the security boundary — and the resolved stack pack.
- Execution
- A typed Python API drives governed execution on Daytona or E2B: sandbox create/status/stop, argv-only exec with cancel, governed file transfer (denylist, secret scan, plan digest), preview URLs or a full deploy pipeline.
- Memory
- Six session-memory tools maintain one project-scoped store — checkpoints, decisions, progress, pending work — validated, size-capped and redacted before storage.
- Evidence
- Every execution appends a JSONL receipt: provider, sandbox id, duration, exit code, error classification. daypack doctor reports platform, keyring backend and profile as they are.
What broke, and what it taught
A case study that only lists wins is a sales page. These are the defects the audit found in my own system, how each surfaced, and what fixing it takes.
Defect
The provider key every migration test exercised was the old, revoked one.
Found by
The live keyring migration run on 30 November 2026 — real legacy file, real Windows keyring — returned an honest credential_invalid from the control-plane test instead of a green tick.
Fix
The control-plane test stays: a migrated key must prove itself against the real API before the audit closes. The fresh key is a human, hidden-prompt step (daypack auth add), and the legacy file is preserved as recovery source until then — verified by hash before and after.
Defect
Hosted CI could not run at all — every job failed before executing a step, on runner availability outside the repository.
Found by
The first CI runs of the release candidate all failed at the runner level, identically.
Fix
Recorded as blocked, not papered over: the suite is proven locally on the exact release trees (Windows, Python 3.12 and 3.13, 598 collected tests), and hosted CI reruns the moment runners are available — no publication until it is green.
Defect
Not every IDE integration had been round-tripped against a real editor configuration.
Found by
The release audit listed the remaining IDE validations explicitly instead of letting the six-IDE claim stand unverified.
Fix
A real install → validate → remove round-trip ran against a production Zed settings.json: dry-run preview, surgical merge with timestamped backup, only-added-server diff, clean removal. The remaining IDEs run the same procedure before publication.
Evidence
- 59 test files — 598 collected tests — green on Python 3.12 and 3.13, Windows
- Static security audit: zero medium/high/critical findings (bandit); no known dependency vulnerabilities (pip-audit); secret scan clean on every commit
- Live-verified 30 November 2026: real keyring migration (idempotent, hash-preserving, honest invalid-key failure) and a real Zed config round-trip
- Clean-install audit: the wheel installs into fresh venvs on 3.12 and 3.13; py.typed shipped; the MCP tool reference is generated from the registry
- 14-tool MCP surface, 9 stack context packs, 6 IDE integration guides; MIT-licensed, pre-release 0.1.0a1
Checked 30 November 2026. Private repository — a sanitised walkthrough and architecture review are available on request. Pre-release 0.1.0a1, feature-frozen: publication is gated on live validations (Daytona key, E2B round-trip) and hosted CI running green on main.