Skip to content

Code Execution

Agent Nine can run shell commands on your machine (Code mode) or in a cloud sandbox (Chat mode).

Code Mode (Local)

In Code mode, commands run directly on your machine with full access to your project files, tools, and environment.

Bash (Linux / macOS)

Run the tests
Check if the project compiles
Install the dependencies and start the dev server

PowerShell (Windows)

Get-ChildItem -Recurse *.ts | Measure-Object
Run npm test

Same security protections apply for both shells.

Chat Mode (Cloud Sandbox)

In Chat mode, code runs in an isolated cloud sandbox:

  • Separate container for each session
  • Pre-installed runtimes: Python, Node.js, Go, Rust, Java
  • No access to your local files
  • Safe for experimentation — nothing affects your machine
Write a Python script that generates a Fibonacci sequence
Create a React component and show me the result

Security

Agent Nine protects you from dangerous commands:

CategoryExamplesBehavior
Destructiverm -rf /, git reset --hard, DROP TABLEBlocked with warning
Irreversiblegit push --force, npm publishRequires explicit approval
Safe / read-onlygit status, ls, cat, grepAuto-approved

Dangerous patterns are detected even when disguised:

  • Encoded commands (base64, hex)
  • Commands inside scripts
  • Piped sequences that end in destructive operations

Timeouts

Duration
Default2 minutes
Maximum10 minutes
BackgroundNo timeout (you'll be notified when done)

Long-running commands can be started in the background — Agent Nine will continue chatting and notify you when the command finishes.

Permissions

ModeBehaviorBest for
DefaultAsks before running every commandBeginners, sensitive projects
Session-approvedApprove once, auto-run similar commandsRegular development
AutoAuto-run everything except destructive commandsPower users

Read-only commands (git status, ls, cat, grep, find) are always auto-approved regardless of permission mode.

Tips

  • Be specific — "run npm test in the backend folder" is better than "test it"
  • Chain tasks — "install dependencies, run tests, then fix any failures"
  • Background execution — for long builds or deployments, Agent Nine runs them in the background
  • Review output — Agent Nine shows you the full command output and explains errors

Agent Nine — AI coding assistant