# Chat backends Chats can be created on more than one harness. OpenCode remains the default; Codex is available when its App Server control socket exists. The selected backend is stored on the operator-session row and returned as `backend` on every `chat_sessions` row, so a restart does not have to guess from the session id. ## Codex The adapter in `internal/codex` connects to the Codex App Server's Unix WebSocket control socket (`$CODEX_HOME/app-server-control/app-server-control.sock`, falling back to `~/.codex`). It uses the operator's existing Codex login. A new chat issues `thread/start`; a prompt issues `turn/start`; history comes from `thread/read`; questions map from `item/tool/requestUserInput` to the normal question card and `chat_answer` returns the JSON-RPC response. Threads created this way are ordinary Codex threads and remain visible to the Codex app. The adapter creates threads with `approvalPolicy: never` and `sandbox: workspace-write`; Codex approvals are not brokered through the chat permission card yet. Claude is not advertised as a backend until its sidecar and login flow are wired.