Navigation
ELOWEN · Documentation

Last updated: October 27, 2026

Browse documentation · Run a shell command
Computers, terminal and Git

Run a shell command

Ask Chetty to run a command and know where it runs, how long it may take and what happens when it runs out of time.

Before you start

The terminal plugin must be granted to your account; read Grant the plugin to an account.

Where the command runs

Chetty resolves command access through the Sandbox plugin for each launch.

  • In a Project conversation, commands follow that Project's access policy and start in the Project root.
  • Inside a managed Project, they run in that Project's environment.
  • A conversation pointed at another directory, such as a Git worktree, runs there.

If Sandbox is unavailable, managed-Project execution is refused. Only the instance owner can use explicit direct-host mode, and a blocking restart of Chetty's own daemon or a request to bypass Sandbox is refused.

Keep the working directory

The working directory carries over from one successful foreground command to the next.

  1. Pass a cwd to start a command in that directory.
  2. When the command finishes successfully, the directory it ended in becomes the working directory for later calls.

Shell variables and functions do not carry over between calls. In the CLI, /cd changes the working directory for the conversation, and a cwd argument overrides it for one command.

Wait for a command

A foreground Bash call waits up to its timeout, measured in milliseconds: 120,000 by default and at least 1. The usual maximum is 600,000.

When the deadline is reached in a person's own interactive conversation, Chetty normally moves the command to the background and returns its process ID. It keeps running without another timeout, and you can read its output later.

That does not happen for a command approved at a permission prompt, when the background-process limit is full, or for shared-room, delegated, workflow, scheduled or other sessionless work; those commands are stopped at the deadline. In the CLI, press Ctrl+B to detach a running foreground command yourself, and its output stays available through the process tools.

Admin: On a self-hosted installation, set bashDefaultTimeoutMs and bashMaxTimeoutMs in harness.json in the instance directory, then restart the daemon. Both are milliseconds within 1–900000, and the maximum must be at least the default.

Do not wait with sleep

A command that is only sleep with a duration of two seconds or more is refused in the foreground, for example sleep 2 or sleep 5m, because it spends the turn waiting.

Start the real work with run_in_background: true and wait for it with ProcessOutput. A command that does more than sleep, such as sleep 19; tail build.log, is allowed, and so is a sleep shorter than two seconds.

If a command does not finish

  • The deadline passed: in a shared room, delegated work or a scheduled job the command is stopped. Start long work in the background instead.
  • The command was refused: a confined account cannot reach that path, or Sandbox is unavailable.
  • The working directory is unexpected: pass cwd explicitly for one command.
  • You lost the output: a command that moved to the background keeps it; read it with ProcessOutput.

Terminal overview, Manage background processes, Run a command in the background, Projects overview.