Terminal & Shell

The agent uses a PTY-based terminal to execute shell commands. This page covers common terminal issues including PTY attachment failures, timeouts, sandbox restrictions, and problems with interactive commands.

PTY Not Attaching

The agent's terminal uses a PTY (pseudo-terminal) to execute shell commands. The PTY must be attached to a DOM element before it can display output. If this fails, you will see a blank terminal card or "Terminal not available".

Symptoms

  • Terminal card appears but shows no output.
  • "Terminal not available" message in the chat panel.
  • Commands execute but output is not visible.
  • Terminal card flickers or appears and immediately disappears.

Solutions

  • Restart the engine: Command Palette > "Creor: Restart Engine". This re-initializes the PTY manager.
  • Check the Output panel (View > Output > Creor Engine) for PTY-related errors.
  • If you are using a custom theme or extension that modifies the chat panel layout, try disabling it temporarily.
  • Resize the chat panel. Sometimes the PTY fails to attach because the container element has zero dimensions.

Note

The terminal container must be in the DOM before the PTY can attach. Creor buffers output during initialization and replays it once the terminal element is ready. If output is lost, the command likely finished before the DOM was ready -- rerun the command to see the output.

Command Timeouts

The agent's bash tool has a default timeout to prevent long-running commands from blocking the conversation. When a command exceeds the timeout, it is terminated and the agent receives a timeout error.

Default Timeouts

Command TypeDefault TimeoutConfigurable
Regular bash commands120 secondsYes, in creor.json
Build commands (npm, cargo, go)300 secondsYes, in creor.json
Test commands300 secondsYes, in creor.json
Background processesNo timeoutN/A (runs until killed)

Increasing Timeouts

If your project has slow builds or long test suites, increase the timeout in your project's creor.json file.

1
2
3
4
5
6
7
{
"tools": {
"bash": {
"timeout": 600
}
}
}

The timeout value is in seconds. Setting it to 0 disables the timeout entirely, but this is not recommended -- a runaway command could block the agent indefinitely.

Working Around Timeouts

  • Ask the agent to run the command in the background: "Run the tests in the background and check the results."
  • Break long-running commands into smaller steps: "Run the unit tests first, then the integration tests."
  • For builds, ask the agent to watch for specific output instead of waiting for completion.

Tip

If a command times out, the agent can still read partial output that was captured before the timeout. It often uses this output to diagnose the issue (e.g., a test that hangs).

Sandbox Restrictions

The agent's bash tool runs in a sandboxed environment that restricts access to certain paths and commands. This protects your system from unintended modifications.

Path Restrictions

By default, the agent can only access files within the workspace directory and standard system paths (for reading). Attempts to read or write files outside the workspace are blocked.

1
2
3
4
5
6
7
8
9
10
11
12
# Allow additional paths in creor.json
{
"tools": {
"bash": {
"allowPaths": [
"/usr/local/bin",
"$HOME/.config/some-tool",
"/tmp"
]
}
}
}

Command Restrictions

Certain destructive commands require explicit permission. The agent will prompt you before running commands that match the deny list.

Command PatternDefault PolicyReason
rm -rf /DenyPrevents accidental system wipe.
sudo *AskRequires explicit user approval.
docker *AskContainer operations may affect system state.
git push --forceAskForce push can destroy remote history.
curl | bashDenyPrevents execution of untrusted remote scripts.

Customizing Restrictions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"permissions": {
"bash": {
"allow": [
"npm *",
"bun *",
"git *",
"make *"
],
"deny": [
"rm -rf /",
"curl * | bash"
],
"default": "ask"
}
}
}

The default policy controls what happens when a command does not match any allow or deny rule. "ask" prompts you for approval. "allow" lets it run automatically. "deny" blocks it silently.

Interactive Commands

The agent's bash tool is designed for non-interactive commands. Commands that require user input (prompts, confirmations, interactive menus) will hang until they timeout.

Common Problematic Commands

CommandProblemSolution
npm initPrompts for package detailsUse npm init -y for defaults.
git rebase -iOpens an interactive editorUse git rebase --onto or non-interactive rebase.
sshPrompts for passwordUse SSH key authentication with no passphrase, or set up ssh-agent.
vim, nanoOpens interactive editorUse the edit/write tools instead.
python (REPL)Starts interactive interpreterUse python -c 'command' or python script.py.
npx create-*Interactive scaffoldingPass all options as flags to skip prompts.

Workarounds

  • Use the -y or --yes flag to auto-accept defaults where available.
  • Pipe input to stdin: echo 'yes' | some-command (the agent can do this automatically).
  • Set environment variables to skip prompts: CI=true, DEBIAN_FRONTEND=noninteractive.
  • Ask the agent to use a non-interactive alternative.

Note

The agent is aware of interactive command limitations. When it encounters a command that would be interactive, it typically adds flags to make it non-interactive or uses an alternative approach.

Shell Environment

The agent's shell environment may differ from your personal terminal. This can cause issues with commands that depend on specific shell configurations.

Common Environment Differences

  • PATH: the agent's PATH includes standard system paths but may not include custom directories from your .bashrc or .zshrc.
  • Shell: the agent uses your default shell (bash or zsh), but it may not load all profile scripts.
  • NVM / RVM / pyenv: version managers that rely on shell initialization may not be active.
  • Aliases: shell aliases from your profile are not loaded.

Adding to the Shell Environment

1
2
3
4
5
6
7
8
9
10
11
{
"tools": {
"bash": {
"env": {
"PATH": "/usr/local/bin:/usr/bin:/bin:$HOME/.nvm/versions/node/v20/bin",
"NODE_ENV": "development",
"CUSTOM_VAR": "value"
}
}
}
}

Environment variables set in creor.json are available to every command the agent runs. Use this to ensure tools like Node.js, Python, or Go are in the PATH.

Output Issues

Truncated output

Very long command outputs are truncated to prevent consuming too many tokens in the agent's context window. The agent sees a note indicating that the output was truncated.

  • The default output limit is approximately 10,000 lines.
  • If you need full output, ask the agent to redirect output to a file: "Run the tests and save the output to test-results.txt".
  • The agent can then read specific parts of the file to find relevant information.

Garbled or encoding issues

If terminal output contains garbled characters or escape codes, the command may be producing output designed for an interactive terminal.

  • Add --no-color or --color=false flags to suppress ANSI color codes.
  • Use --plain or --json output modes when available.
  • Set the TERM environment variable: TERM=dumb for the simplest output format.