Terminal and commands
How the agent runs commands, the two execution modes, approving what runs, and fixing a terminal that appears to hang.
Updated September 2, 2026
The agent runs commands to build, test, inspect and verify. Two modes decide how.
Background exec (default)
Commands run as a managed process and their output is read directly.
This is the default because it does not depend on shell integration — it works the same in an unusual shell, with a custom prompt, over SSH, and in a container.
VS Code terminal
Commands run in a visible VS Code terminal, and output is read through VS Code's shell integration API.
Choose this when you want to watch commands run in a terminal you can also type into.
Settings → Terminal → Execution mode.
When a command appears to hang
Nearly always shell integration in VS Code terminal mode. The command finished; the integration never reported it, so the agent waits out its timeout.
In order:
- Switch to background exec. It removes the dependency entirely and is why it is now the default.
- Raise the shell integration timeout. A shell with a heavy startup — a large
.zshrc, a version manager — may need more than the default 4 seconds. - Try a simpler shell profile.
toolsxpo.terminal.defaultProfileselects which one to use; a plain bash or zsh profile often works where a heavily customised one does not.
Approving commands
By default the agent asks before running anything. Auto-approve, in the menu above the prompt box, can grant standing permission per category — read-only commands are the safe thing to auto-approve; anything writing or executing is worth keeping as a decision.
For a hard boundary rather than a preference, use a hook: a rule asks the model not to run something, a hook makes it impossible.
Long output
Output beyond a few hundred lines is written to a log file and the agent is given the first error lines plus a pointer. A build log is mostly noise, and putting all of it into context crowds out the code being worked on.
See also
Related
Quickstart: your first task with ToolsXpo Code
Install the extension, sign in from your browser, and give the agent its first task — about five minutes end to end.
Choosing a model
What the model picker shows you, why some models are greyed out, and how to search a catalogue of hundreds with filters.
What an agent task costs
How a ToolsXpo Code request is priced, what makes one task cheaper than another, and where to see what you spent.
Agent and scout tiers
Two reserved names — toolsxpo-agent and toolsxpo-scout — that let your workspace decide which model runs, without pinning it into the extension.