Files
pipelines/docs/chat-backends.md
T
alan f7a3a49f94 chat: add the Codex backend
Store a chat's harness with its operator session, expose chat_backends and a
backend choice in New chat, and route each session through a manager. The Codex
adapter uses the App Server's Unix WebSocket for threads, turns, history,
questions and interrupt; OpenCode remains the default and Claude is not
advertised until its sidecar and login are wired.
2026-10-20 12:10:39 +01:00

22 lines
1.1 KiB
Markdown

# 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.