Docs › Agent

Running commands

How the agent runs shell commands, background tasks for dev servers, and the read-only command list in Ask mode.

The agent's commands run as hidden background processes, so they never take over your terminal: the terminal you type in stays yours. Each command's card shows its output, and Open in terminal shows it in a read-only terminal of its own. To watch them run in the integrated terminal instead, set astracode.agent.terminal to integrated.

Limits

Long-running processes

Dev servers, watch-mode test runners, build watchers and tunnels do not exit on their own, so the agent starts them as background tasks instead. It gets a task id back, can read the output later, and can stop the task. Every background task is killed when the window closes.

This matters because waiting on a dev server would block the run until the timeout, and the timeout would then kill the thing you wanted running.

Ask mode is read-only

Ask mode can run commands, but only from an allowlist: a short list of programs whose only effect is output, with the flags that would make them write named and refused. No pipes, redirects, chaining or command substitution, because any of those can turn a read into a write.

env and printenv are not on the list. They read, and what they read is secrets.

All documentation

Get started

Agent

Context

Workspaces

Connectors

Extending AstraCode

CLI

Reference