Add sandbox status to status line JSON input

Resolved 💬 3 comments Opened Mar 4, 2026 by xicodomingues Closed Apr 29, 2026

Feature Request

The status line script receives a JSON object via stdin with fields like model, workspace, cost, context_window, etc. However, there is no field indicating whether sandbox mode is active.

Problem: The SANDBOX_RUNTIME env var is available inside sandboxed bash commands but is NOT passed to the status line script's environment. The status line script runs in the parent process context and has no way to detect sandbox state.

Requested change: Add a sandbox field to the status line JSON, e.g.:

{
  "sandbox": {
    "enabled": true
  }
}

This would allow users to display a sandbox indicator in their custom status lines.

Workaround attempted: Writing marker files from sandboxed bash and reading them in the status line script — fragile and requires a bash command to run first.

Related: Similar to #24279 (fast mode state not exposed to status line).

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗