run

run is a command for Claude Code from MadAppGang/magus. It costs 44 tokens per session (760 once invoked), scanned A, original, MIT.

A command for running programs in an isolated terminal session while capturing their complete output and exit status. It cleans up the temporary session when the command finishes.

In plain words
What is it for?
Use it for tests, commands with prompts, terminal-rendered output, Docker Compose, and other tasks that need a real terminal. Use a watch command for processes that must keep running.
Why use it?
It provides a real terminal for interactive prompts, colored output, progress displays, and other commands that do not behave well in a basic shell call.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the terminal plugin — 5 skills, 7 commands, 1 agent shipped together

Good fit Use it for tests, commands with prompts, terminal-rendered output, Docker Compose, and other tasks that need a real terminal. Use a watch command for processes that must keep running.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/madappgang/magus/run
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/MadAppGang/magus

Made for: Claude Code.

Or install terminal, the plugin that ships this one along with the rest of its 5 skills, 7 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for run

README.md
[![agentmods](https://agentmods.dev/badge/commands/madappgang/magus/run/github.svg)](https://agentmods.dev/commands/madappgang/magus/run)
Your own site
<a href="https://agentmods.dev/commands/madappgang/magus/run"><img src="https://agentmods.dev/badge/commands/madappgang/magus/run/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for run

Your own site · 80×15
<a href="https://agentmods.dev/commands/madappgang/magus/run"><img src="https://agentmods.dev/badge/commands/madappgang/magus/run.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 760 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00760
Opus 5.5 $0.00018 $0.00304
Sonnet 5.5 $0.00009 $0.00152
Haiku 4.5 $0.00004 $0.00076

Measured 1mo ago against content hash 6ee2ff35a448, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

run scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

/terminal:run "curl -s https://api.example.com/health | jq"
plugins/terminal/commands/run.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/terminal:run

Runs one command in an isolated pane the user never sees, returns the output and exit code, and leaves nothing open. This is the default terminal command for one-shot work.

Usage

/terminal:run {command}

Examples

/terminal:run npm test
/terminal:run go test ./... -v
/terminal:run "curl -s https://api.example.com/health | jq"

When to Use /terminal:run vs Bash

Scenario Use
Simple non-interactive command Bash tool
Command with colored or formatted output /terminal:run
Command with interactive prompts /terminal:run
TUI-rendered output (progress bars, tables) /terminal:run
Long-running continuous process /terminal:watch instead
Multi-step REPL session /terminal:repl instead

Behavior

One-shot commands (the default path)

mcp__plugin_terminal_mux__execute-command({ command: "<user_command>", isolated: true })
→ { output, exitCode, timedOut }

With isolated: true and no slot, the pane is ephemeral: it opens, runs the command, and closes on its own. No slot number is held, so nothing needs cleaning up. Pass timeoutSeconds for commands that run longer than the default.

Commands that need streaming status

When the output should be watched as it arrives (a build with progress stages, a script that may hang), open an isolated slot and close it afterwards:

mcp__plugin_terminal_mux__start-and-watch({
  slot: 2, isolated: true,
  command: "<user_command>",
  pattern: "\\$ $",
  triggers: "exit,error",
  timeout: 120
}) → { slot: 2, created: true, event, detail, elapsed, output, paneState }

mcp__plugin_terminal_mux__close-pane({ slot: 2 }) → [{ "slot": 2, "action": "killed" }]

event distinguishes success (pattern:…, exit) from error and timeout; output holds the transcript. Always close the slot, on every outcome.

Error Handling

  • Command appears hung: mcp__plugin_terminal_mux__pane-state({ slot: 2 }) reports waitingForInput. If it is waiting on a password prompt, stop and tell the user.
  • event == "timeout": report the partial output, then close-pane({ slot: 2 }).
  • Stuck process: mcp__plugin_terminal_mux__send-keys({ slot: 2, keys: "C-c", literal: false }), then close the slot.

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -13 lines · +6 tokens per session 6ee2ff35a448
  2. 1mo ago First seen · 88 lines · 38 tokens per session scan A f5a3aa9cd115

Subscribe to this mod's changes

run is a command published in the GitHub repository MadAppGang/magus (13 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 760 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.