mini-SWE-agent: safety, modes and how to run it
How mini-SWE-agent's confirm, yolo and human modes work, where it runs commands, where it saves runs, its 2026 CVE and steps to run it safely.
- Made by
- Princeton and Stanford team behind SWE-bench and SWE-agent
- Runs in
- Terminal CLI (mini), Python bindings, Batch inference for benchmarks, Trajectory browser
- Platforms
- macOS, Linux, Windows
- Licence
- Not stated
1 public advisory
Security advisories and reported issues since 2025, from vendor advisories, NVD and public reports. Checked December 2, 2026.
On this page
What mini-SWE-agent is
mini-SWE-agent (the mini command) is a terminal agent whose only tool is bash. Each command runs as its own subprocess with no persistent shell, and the message history is a plain list, so a run is easy to read and replay. It is not SWE-agent: SWE-agent keeps custom tools, history processors and heavy YAML config and is now in maintenance-only mode, while mini-SWE-agent is the simpler successor that the same team treats as the default choice. The mini CLI runs on your own machine by default, and the same code can run commands in Docker, Podman, Singularity, bubblewrap and other environments.
Install mini-SWE-agent
pip:
pip install mini-swe-agentRun once with uv:
uvx mini-swe-agentInstall with uv:
uv tool install mini-swe-agentInstall with pipx:
pipx install mini-swe-agentmini-SWE-agent news and advisories
Releases and announcements, with public security advisories on the same line.
- CVE-2026-108592
BubblewrapEnvironment in mini-swe-agent 1.10.0 through 2.4.6 ran bwrap without --clearenv, so commands inherited the host environment. A prompt injection in task content could make the agent read API keys from the environment and send them out over the shared network. VulnCheck rates it CVSS 6.0. The advisory page lists no fixed version.
VulnCheck advisory v2.4.6 was released. It counts billed model calls that fail to parse against the cost limit, so failed calls can no longer slip past it.
mini-swe-agent release pagev2.4.5 was released with fixes that read config files as UTF-8 and stop malformed tool-call errors from being reported as output truncation.
mini-swe-agent release pagev2.4.1 was released, including a fix that kills the local process group when a command times out.
mini-swe-agent release pageA release added a wall-clock time limit so agents are properly killed, along with a fix for a cost limit of zero.
mini-swe-agent release page
How mini-SWE-agent keeps itself in bounds
Out of the box, confirm: you press Enter to approve each command, or type a rejection message.
| Mode | How to turn it on | Asks you | What it allows |
|---|---|---|---|
confirm | Default, or /c while the agent waits for input | Before each action | The model proposes a command and you press Enter to run it, or type a message to reject it. |
yolo | mini -y or --yolo, or /y | Never | Runs every command from the model immediately, with no confirmation. |
human | /u while the agent waits for input | Never | You type and run the commands yourself, and the model does not act. |
Cost and step limits | cost_limit: 3. and step_limit: 0 in mini.yaml; MSWEA_GLOBAL_COST_LIMIT and MSWEA_GLOBAL_CALL_LIMIT globally | Never | Stops a run at a dollar or call limit. The default config sets a cost limit of 3 dollars per run and no step limit. |
Where its settings live
| Path | What it holds |
|---|---|
.env in the global config directory | API keys and defaults such as MSWEA_MODEL_NAME. The exact path is printed when you run mini --help |
Global config directory (path printed at start) | mini saves the full history of your last run here |
mini.yaml | Default agent config with templates, cost and step limits and mode: confirm. Override with -c or MSWEA_MINI_CONFIG_PATH |
MSWEA_CONFIG_DIR | Optional folder of your own config files that can then be named on the command line |
- By default mini asks you to confirm each command, and every command is a separate subprocess, so the model cannot keep a shell open or export state between steps. That makes each approval small, but the commands still run on your machine as your user in the default local environment.
- yolo mode removes the prompt. Use it only where the environment itself limits damage, such as a Docker or Podman container, since the agent's only tool is bash and it can do anything bash can.
- The default config caps cost at 3 dollars a run with no step limit. Global limits are off until you set them, and MSWEA_COST_TRACKING set to ignore_errors can leave spending unmanaged.
- The bubblewrap environment has had an advisory: before the fix it passed the host environment to commands, so a prompt injection could make the agent read API keys and send them out over the network.
Security incidents and advisories
| Date | Advisory | What happened |
|---|---|---|
CVE-2026-108592Medium | BubblewrapEnvironment in mini-swe-agent 1.10.0 through 2.4.6 ran bwrap without --clearenv, so commands inherited the host environment. A prompt injection in task content could make the agent read API keys from the environment and send them out over the shared network. VulnCheck rates it CVSS 6.0. The advisory page lists no fixed version.No fixed version published |
How to run mini-SWE-agent safely
- Stay in confirm mode on your own machine and read each command before pressing Enter.
- Use yolo only inside a container (Docker or Podman) or a VM that holds nothing you need, and mount just the project folder.
- Do not rely on the bubblewrap environment to hide secrets from the agent. Keep API keys out of the environment the agent's commands inherit, or use a container with an explicit, minimal environment.
- Set MSWEA_GLOBAL_COST_LIMIT and MSWEA_GLOBAL_CALL_LIMIT, and use a model key with a spending cap. Do not set MSWEA_COST_TRACKING to ignore_errors unless you accept unmanaged spend.
- Use a fine-grained, short-lived token if the agent needs Git access, and keep it out of the working folder.
- Be careful with task text from issues or web pages, since it is a prompt injection route. Read what you give it.
- Check the saved run history in the global config directory after a run, and review the diff before you commit.
- Pin the version (for example pip install mini-swe-agent==2.4.6 or newer) and watch the release page, because v2 changed config and trajectory formats.
Where Excellent fits
| What Excellent does | With mini-SWE-agent |
|---|---|
Reads its session logs (free scan) | Yes |
Its key finder reads its key files | Yes |
Live check before risky actions (Pro) | No |
Excellent's sandbox | Claude Code and Codex only |
Rule sharing | Claude Code and Codex only |
Excellent reads mini-SWE-agent's session logs on your Mac. The free scan shows what it did: your email in request commands or form inputs, keys sitting in logs, secrets files read, history overwritten, checks skipped. Each finding says which agent and where.
Excellent's sandbox and rule sharing are for Claude Code and Codex only. The check reads what a command says, so it isn't a wall around your Mac.
Questions
Does mini-SWE-agent run commands in a container?
Not by default. The mini CLI uses the local environment. The project supports Docker, Podman, Singularity, bubblewrap and others, which you choose in config.
Is mini-SWE-agent the same as SWE-agent?
No. It is a separate, much smaller project from the same team. It has only a bash tool and a linear history, while SWE-agent has custom tools and a large config system. SWE-agent is in maintenance-only mode and mini-SWE-agent is recommended.
What are the mini-SWE-agent modes?
confirm (default, you approve each command), yolo (runs commands at once) and human (you type the commands). Switch with /c, /y and /u, or start in yolo with -y.
How do I set the API key and default model?
Run mini-extra config setup, or mini-extra config set KEY VALUE. Values go to a .env file in the config directory, and environment variables take precedence.
Does mini-SWE-agent support MCP?
The pages I read do not mention MCP. It uses bash as its only tool, so I could not confirm any MCP support.
Sources
Checked December 2, 2026. mini-SWE-agent changes often, so its own docs win where they differ from this page.
- mini-swe-agent repository README
- mini-SWE-agent docs: mini usage and modes
- mini-SWE-agent docs: Quick start
- mini-SWE-agent docs: Global configuration
- mini-SWE-agent docs: FAQ
- mini-SWE-agent docs: v2 migration guide
- mini-swe-agent release page
- mini-swe-agent security advisories
- VulnCheck: CVE-2026-108592
- SWE-agent docs: Setting up (maintenance notice)
