Project codex chat console surface
Justin approved building codex.justinsforge.com: a new FastAPI user service on Console (forge_codex_chat_api.py, port 7366) providing a claude.ai/code-style chat UI backed by the Codex CLI (0.143.0, installed at ~/.local/bin/codex), deliberately kept separate from the Claude session-launcher.
Key design decisions (approved, not to re-litigate):
- Auth: ChatGPT sign-in via codex login --device-auth (flat quota, not pay-per-token API key). Isolated CODEX_HOME=~/.codex so Codex creds never mix with Anthropic creds.
- Isolation: each chat thread runs in its own git worktree (commit-early pattern, same as CreatorTrack dev slots), approval_policy=never (headless), sandbox scoped to the worktree so Codex can't touch live forge automations.
- Backend mechanics: each turn shells codex exec [resume <thread>] --json --cd <worktree> --sandbox workspace-write, streams JSONL to browser via SSE. Threads persisted in data/codex_chat.db; images in data/codex_uploads/.
- Fronted behind CF Access + VR Alliance tunnel, 127.0.0.1 origin only.
- Out of scope v1: OpenAI cloud, PR automation, multi-user, mobile extension, parallel turns per thread.
- Full 10-task plan at memory/plans/codex-chat-console-surface-2026-07-08.md.
Why: Justin wants a persistent, isolated web chat surface for Codex CLI work, distinct from the existing Claude launcher, so Codex never dirties main or interferes with forge automations.
How to apply: Future sessions continuing this build should read the plan file first, confirm Task 1 (Codex CLI install + auth) completed via ~/.codex/auth.json existing, and follow the isolation/worktree pattern already approved rather than re-asking Justin about auth method or isolation approach.
[auto-memory session 7dc708b9-533c-4c6a-a326-d374a7ff7db5, confidence 0.85, mode direct]