feat: support selectable CLI runtime profiles
Problem
A single CloudCLI installation can be used with more than one coding-agent environment: separate work and personal accounts, different CLI installations or versions, and provider-specific endpoint or credential settings. Today each provider uses one server-wide process environment, so changing context means editing server configuration and restarting, with no way to preserve that choice on a conversation.
Proposal
Allow operators to define named runtime profiles per provider. A profile selects an optional CLI executable and an environment-variable overlay. When starting a new conversation, users choose among the profiles available for that provider; CloudCLI persists the choice with the session and uses it again for later turns and forks.
Profiles should be configured server-side. The UI/API should expose only safe metadata such as the profile id, name, provider, and description; executable paths and environment values must remain private because they can contain deployment details or credentials.
Expected behavior
- Keep the existing provider default as the zero-configuration behavior.
- Support Claude, Codex, Cursor, and OpenCode through one shared profile contract.
- Validate that a profile belongs to the selected provider.
- Keep a session on the profile selected at creation time, including when it is resumed or forked.
- Let each provider remember a preferred profile for the next new conversation.
Related work
- #1145 requests a custom Codex executable path.
- #1124 attempted a global
CODEX_CLI_PATHsetting, but was closed without merge.
Those are useful narrower cases. Runtime profiles cover custom binaries while also supporting multiple isolated environments and accounts without treating Codex as a special case.
Source: siteboon/claudecodeui