gloocode run sends one task to Gloo Code, prints the result, and exits. There is no terminal UI and no one to click Approve, so it suits scripts, one-off tasks, and anything you want to chain with other commands.
A run uses the profile you are signed in with, so install and sign in first: see Installation & Setup.
Use it when you want to:
- Fire off a single task without opening the TUI.
- Pipe a file or command output into Gloo Code.
- Call Gloo Code from a shell script or a Makefile.
- Read the results as JSON from another program.
Run your first task
Pass your message afterrun:
Choose where it runs
By default the run happens in your current folder. Use--dir to point it somewhere else:
--file are resolved from that folder.
Project setup in a run
A folder can bring its own setup: instructions such asAGENTS.md and CLAUDE.md, a gloocode.json config, skills, plugins, and MCP servers. gloocode run uses that setup only if you trusted the folder in Gloo Code, and only as it was when you trusted it. Each MCP server the folder defines also needs your approval. When the run leaves something out, it says so before it starts and lists what it left out, then carries on without it.
To trust a folder, open it in the desktop app or the terminal UI and say yes when Gloo Code asks, or type
/trust.
In CI (the
CI environment variable is set to anything other than empty, 0 or false), a run that left out project setup you haven’t trusted exits with code 1. Pass --trust-project if the run should use the repository’s setup, or --without-project-setup if it shouldn’t.Choose a model and an agent
Gloo Code picks a model for you. To choose one yourself, pass-m (or --model) with a gloo/<model-key> name:
gloocode models --verbose.
Use --agent to run as a specific primary agent, such as plan:
Continue or fork a session
Each run starts a new session unless you ask it to pick one up:Attach files
Use-f (or --file) to attach files to your message. Repeat it for more than one:
Pipe in input
When something is piped intogloocode run, it is appended to your message:
Run a saved command
Use--command to run one of your saved slash commands. Whatever you put in the message is passed to the command as its arguments:
Read the output as JSON
By default,gloocode run prints human-readable output. Add --format json for a stream of JSON events, one per line, that a script can read:
set -o pipefail, a failed run can still leave the pipeline with exit status 0, because the shell reports the status of jq.
Every line carries type, timestamp, and sessionID (except trust_skipped, which comes before the session starts), plus a payload that depends on the type.
The stream includes these events:
Exit codes
A tool call that fails partway through doesn’t make the run fail on its own, because the agent can recover and carry on. With
--format json, failed tool calls show up as tool_use events with part.state.status set to "error", and failed turns show up as error events.
Permission prompts in a run
A script can’t answer a prompt, sogloocode run answers for you: by default it rejects any permission request and keeps going. Work inside your project rarely asks for permission, so many tasks run fine as they are. A request that does come up appears as a warning line, or as permission_asked and permission_replied events with --format json.
For a task that needs those requests approved, add --unleashed and gloocode run allows every prompt that no deny rule blocks:
--unleashed applies to that one run only. There is no setting to leave it on, so each run that skips prompts says so on its command line.
If a safety setting turns an action down, the run prints the setting that would allow it. See Safety settings.
From Claude Code and Codex
If you already script another coding agent, the move is one command:
Both pages cover the rest of the move: From Claude Code and From Codex.
Next steps
Migrate to Gloo Code
What carries over from other coding agents.
Install Gloo Code
Install the CLI and sign in.
Billing & Plans
Tiers, seats, monthly allowance, and top-ups.

