pioneer-cli-agent-runtime; the protocol enum also reserves a claude kind for future or in-progress runtime work.
CLI runtimes are not pioneer-provider adapters. API providers expose provider/* methods. CLI runtimes expose cli_runtime/* methods and are selected as an execution backend on turn/start.
Methods
Every method takes
workspace_id. Runtime visibility is gateway-owned, but clients use the workspace id so responses and notifications can be scoped to the selected workspace.
Runtime summary
ARuntimeSummary includes:
Diagnostics are sanitized before they cross the protocol boundary. Secret-like keys, bearer tokens, raw payloads, and long lines are redacted or truncated.
capabilities.supports_mcp_tools means the runtime can receive the gateway’s selected MCP projection for a turn. It does not mean every configured server or tool is available: workspace policy, turn permissions, provider support, catalog state, readiness, and the shared MCP limits still apply. Clients should use the capability flag as an eligibility signal and render the actual accepted or rejected capability results from the turn projection.
Listing runtimes
Runtime proxy
CLI runtime processes run on the gateway host. When a runtime needs a different egress route, configure its proxy withcli_runtime/proxy/set. The gateway validates and stores the URL for the selected workspace and runtime, passes it to runtime startup and account/MCP readiness probes, and exposes the configured value in sanitized runtime status.
Use cli_runtime/proxy/delete to remove it. Proxy credentials belong in the gateway secret store; clients should never log or echo them.
Model selection
Clients can merge API providers and CLI runtimes in one model selector. The mobile client represents CLI runtime provider rows with the synthetic provider key:cli_runtime/list_models, then start turns with execution_backend set to cliAgentRuntime.
Starting a CLI runtime turn
turn/start can select the runtime explicitly:
permission_profile is the Pioneer-level permission mode. The gateway resolves it into the turn security snapshot and maps it into the runtime-specific approval/sandbox policy before starting the native runtime turn. For Codex, full_access maps to never, supervised maps to on-request, and auto_accept_edits currently uses on-request as a stricter fallback. For Claude-style runtimes, full_access maps to bypassPermissions, auto_accept_edits maps to acceptEdits, and supervised maps to default.
cli_runtime_options remains runtime-specific for options such as sandbox, effort, personality, summary, and steer_if_active. Clients should not send a separate runtime approval policy here; use permission_profile so Pioneer can persist one permission profile and audit model for the turn.
Thread binding and steering
When a Pioneer thread is backed by a native runtime thread, the gateway stores aCLIRuntimeThreadBinding with the Pioneer thread id, runtime id, native thread id, optional native cwd/model, and binding status.
Clients can read the binding with:
Pending requests
CLI runtimes can ask the user to approve commands, approve file changes, or provide input. The gateway publishes:
Request kinds include
command_approval, file_change_approval, user_input, and other.
Resolve a request with:
denied, cancelled, answered, expired, and error.
These are runtime-native pending requests. Native Pioneer tool permission prompts use turn/permission/request/opened, turn/permission/request/respond, and turn/permission/request/resolved; see Turns API.
Notifications
CLI runtime notifications are:Settings
Configured CLI runtime instances are exposed throughsettings/get under settings.cli_runtimes.instances. Updating settings.cli_runtimes replaces the runtime instance list stored in gateway-settings.toml.
Operator defaults can also come from app config under [gateway.cli_agent_runtime] and [gateway.cli_agent_runtimes.<id>]. User-facing clients should prefer settings/get and settings/update for runtime changes.
Schemas
Generated schemas include:/schemas/agent_execution_backend.json/schemas/turn_cli_runtime_options.json/schemas/runtime_summary.json/schemas/runtime_status.json/schemas/runtime_capabilities.json/schemas/runtime_model_info.json/schemas/cli_runtime_list_params.json/schemas/cli_runtime_list_response.json/schemas/cli_runtime_list_models_params.json/schemas/cli_runtime_list_models_response.json/schemas/cli_runtime_thread_binding.json/schemas/cli_runtime_turn_steer_params.json/schemas/cli_runtime_request_respond_params.json
Related pages
- CLI Runtime Architecture explains session management, native thread/turn bindings, pending requests, and restart recovery.
- Permission System explains how Pioneer permission modes and security snapshots map into CLI runtime approval and sandbox policies.
- Provider System explains why CLI-backed runtimes are separate from API provider adapters.
- Client Architecture explains how desktop and mobile consume runtime projections.