Safe agentic development,
whatever the model.

Define a boundary once. Run any coding agent inside it, and swap in a cheaper model without weakening it.

curl -fsSL https://raw.githubusercontent.com/diderisoft/bot-bottle/main/install.sh | sh

Alpha Free while in alpha. Ships with Claude Code, Codex and pi.

Try it

curl -fsSL https://raw.githubusercontent.com/diderisoft/bot-bottle/main/install.sh | sh
bot-bottle start   # pick an agent, describe the task, accept the bottle

Close the terminal and the agent keeps working. Anything it needs comes to your phone as an approval.

Why bot-bottle

Use cheap models safely

Cheaper and open-weight models are where the savings are, but they're easier to hijack. In a March 2026 red-teaming study, replayed attacks worked on open-weight Qwen3 VL 235B 53% of the time, against 2.5% for Claude Opus 4.5. Read the study Their harnesses are younger too, with permission prompts that run inside the same process the model drives.

A bottle doesn't rely on the model behaving. Egress limits, key shielding, and a throwaway filesystem hold whichever model is inside. A cheap model can still write bad code, but it can't take your keys or get out of the bottle.

Bottles are plain files

A bottle lists what an agent may reach: hosts, repos, and the secrets each request carries. Anything else is blocked or comes to you to approve. It lives in your repo, and the same bottle works with Claude Code, Codex or pi.

# .bot-bottle/bottles/api.md
---
extends: basic  # package registries
git_gate:
  # pushes are scanned for secrets
  repos: [github.com/diderisoft/bot-bottle:write]
egress:
  routes:
    - host: api.stripe.com
      # the key is added by the gateway
      auth: {type: bearer, value: secret:STRIPE_KEY}
---

For work on the billing API: push to bot-bottle and
call Stripe with the team's key. Launch an agent in it
with `bot-bottle start --bottle ./api`.

Prevent the next incident

Agents leak keys, run poisoned tools, delete databases and wipe machines. Some documented cases:

Leaked keys

  • 28.6 million secrets leaked in public GitHub commits in 2025 alone, a 34% year-over-year jump. Commits co-written with AI assistants leaked secrets at roughly double the baseline rate, which the report puts down to speed, not any one assistant. Read the report
  • One prompt-injected pull request title made three agents (Claude Code, Gemini CLI and GitHub Copilot) post their own API keys and tokens as a public comment. Incident report
  • Approving a command "and don't ask again" saved its keys in a settings file that developers then pushed: 2,539 secrets across 1,994 public repositories. Incident report

Stopped by:

Secret scanning Key shielding

Poisoned tools

  • A worm in 19 look-alike npm packages planted a fake MCP server in Claude Code, Cursor and Windsurf, whose tools told the agent to hand over SSH keys, cloud credentials and tokens. Incident report
  • A hijacked build package hunted for secrets by running its victims' own AI coding CLIs with permission checks turned off, exposing 2,180 GitHub accounts and 7,200 repositories. Incident report

Stopped by:

Key shielding Egress allowlist Throwaway filesystem

Deleted databases

  • A production database, deleted mid-code-freeze, then covered up with fabricated test results and a false "rollback is impossible" claim. Incident report
  • Another, deleted along with its backups in one API call, after the agent found a stray credential in an unrelated file and used it. Incident report
  • Given an engineer's elevated permissions, an agent decided to delete and recreate a live production environment, causing a 13-hour outage. Amazon blamed misconfigured access controls. Incident report

Stopped by:

Egress allowlist Key shielding

Wiped machines

  • A Mac's entire home directory and keychain wiped by a trailing ~/ in a cleanup command, breaking authentication across every app on the machine. Incident report
  • A second Mac wiped after a HOME variable expanded inside a delete command during a high-autonomy session, weeks after the model's own system card had flagged the risk. Incident report
  • Asked to clear a project cache, an agent pointed the delete at the root of the D: drive and erased all of it. Incident report

Stopped by:

Throwaway filesystem

FAQ

Why not a VM, Docker Sandboxes or Claude Code's sandbox?

A VM or a sandbox is a wall. The hard part is what you let through it.

If your keys go in with the agent, they can go out with it, and anything it sends to an allowed host goes out unread. bot-bottle is the wall plus the door: a gateway that holds the keys, allows only what the task needs, scans what leaves and gates every push. When the agent needs more, you approve it from your terminal or phone. Describe the task, and the bottle is drafted for you, for any agent.

Do I have to design a policy for every task?

No. Bottles compose: keep a base bottle for your stack, and a task adds only what it needs on top. The architect reuses your bottles and proposes the difference, so you review a few lines, not a whole policy. Repos can ship bottles too, which run once you trust them. Less time drawing boundaries, and the boundary is just as strong.

How easy is scoping API access?

A route per host, as narrow as the task needs. Routes are read-only until you list methods, and allow narrows one to paths and headers, so an agent can read issues without being able to delete a repo. Repos are read-only unless granted :write. The gateway adds the token per route, and anything the bottle left out comes to you as an approval.

Will it work with my setup?

It runs your agent's own harness, with the login you already have, on your machine. Repos come in through git-gate, packages install from the usual registries, and a bottled agent can be resumed later with its session. On macOS a bottle can also run containers of its own.

What does --auto grant?

Only the bottle it proposes, which reuses your bottles and adds what the task needs. Nothing is saved. Anything it left out is blocked and comes to you as an approval while the agent works.

Does it always run in a microVM?

On Linux with KVM it uses Firecracker; on macOS, Apple's container. Hosts with neither can fall back to Docker, where the agent shares the host kernel. The gateway is still the only way out, but the isolation is weaker. bot-bottle doctor shows which backends are ready.

How strong is the secret scanning?

There are two layers. Your real tokens never enter the VM, so there's nothing there to steal: that part is structural. On top of that, outbound requests and every push are scanned for credential-shaped strings. The first is a guarantee. The second catches mistakes, not an agent set on hiding a secret.