How 0-mkdad/codex-chatgpt-web-multidevice works
Codex sends Responses API requests to the local runtime, which parses them, prepares a ChatGPT Web turn, drives the browser, and returns the result. The Electron launcher configures that runtime and browser, guides MCP setup, and offers usage and health surfaces. The README documents additional modes and capabilities that are represented at subsystem level; several launcher and runtime internals were not sampled, so their links are limited to documented or indexed relationships.
Main entry points: main.cjs Launcher controller · server.ts HTTP runtime · App.tsx Launcher interface · index.ts Web adapter
Components 19
Codex runtime
- HTTP runtime
src/server.ts - Responses parser
src/responses/parser.ts - Model routing
src/chatgpt-web-models.ts - Runtime configuration
src/config.ts
ChatGPT Web adapter
- Web adapter
src/adapters/chatgpt-web/index.ts - Prompt assembly
src/adapters/chatgpt-web/prompt.ts - Token estimation
src/lib/token-estimate.ts - Turn coordination
src/adapters/chatgpt-web/turn-broker.ts - Browser worker
src/adapters/chatgpt-web/browser-worker.ts
Desktop launcher
- Launcher interface
launcher/src/App.tsx - Launcher controller
launcher/electron/main.cjs - Embedded browser
launcher/electron/browser-host.cjs - Runtime supervisor
launcher/electron/runtime-supervisor.cjs
MCP harness
- Outbound tunnel
src/tunnel-service.ts - MCP integration
src/adapters/chatgpt-web/mcp-server.ts
Usage and diagnostics
- Limits surface
launcher/src/LimitsSurface.tsx - Usage tracking
launcher/electron/limits-controller.cjs - Health diagnostics
src/doctor.ts
Other components
- Codex client
Connections 19
- Codex client → HTTP runtime: sends requests
README.md - HTTP runtime → Responses parser: parses responses
src/server.ts - HTTP runtime → Web adapter: routes turns
src/server.ts - HTTP runtime → Model routing: resolves models
src/server.ts - Web adapter → Prompt assembly: builds prompts
src/adapters/chatgpt-web/index.ts - Prompt assembly → Token estimation: estimates tokens
src/adapters/chatgpt-web/prompt.ts - Web adapter → Turn coordination: coordinates turns
src/adapters/chatgpt-web/index.ts - Turn coordination → Browser worker: dispatches turns
src/adapters/chatgpt-web/turn-broker.ts - Browser worker → Embedded browser: uses browser
src/adapters/chatgpt-web/browser-worker.ts - Launcher interface → Launcher controller: requests operations
launcher/src/App.tsx - Launcher controller → Runtime supervisor: controls runtime
launcher/electron/main.cjs - Launcher controller → Embedded browser: controls browser
launcher/electron/main.cjs - Launcher controller → Runtime configuration: configures runtime
README.md - Launcher controller → Outbound tunnel: sets up tunnel
README.md - HTTP runtime → MCP integration: serves MCP tools
README.md - Launcher interface → Limits surface: shows limits
launcher/src/App.tsx - Limits surface → Usage tracking: requests tracking
- Launcher controller → Usage tracking: handles limits
launcher/electron/main.cjs - Launcher interface → Health diagnostics: offers health checks
README.md