name: codex-chrome-linux description: Inspect, instrument, and control Linux Google Chrome through the local Codex Chrome Extension native messaging bridge. Use when Codex needs Chrome tabs, history, navigation, Chrome DevTools Protocol commands, native host manifest/socket troubleshooting, or a Linux browser-control path instead of Chrome DevTools MCP.
Codex Chrome Linux
Use codex-linux-extension-host as the only interface to the Codex Chrome
Extension bridge. It talks to the Chrome native messaging host over a local
Unix socket and returns JSON for Codex turns.
Read references/protocol.md when setup, method names, fixed paths, or
troubleshooting details matter.
Workflow
- Verify the CLI and bridge health:
HOST_BIN="$(command -v codex-linux-extension-host || printf '%s' "$HOME/.local/bin/codex-linux-extension-host")"
"$HOST_BIN" --json doctor
- If
manifest-json,manifest-origin, ormanifest-host-pathis false, install the Chrome native messaging manifest, then restart or trigger Chrome:
HOST_BIN="$(command -v codex-linux-extension-host || printf '%s' "$HOME/.local/bin/codex-linux-extension-host")"
"$HOST_BIN" --json install-manifest --host-path "$HOST_BIN"
- Confirm the Codex Chrome Extension is installed and enabled. Extension ID:
hehggadaopoacecdllhhajmbjkdcmajg. Web Store URL:
https://chromewebstore.google.com/detail/codex/hehggadaopoacecdllhhajmbjkdcmajg
- Use stable IDs for operations that touch tabs:
export CODEX_CHROME_SESSION_ID="codex-linux"
export CODEX_CHROME_TURN_ID="manual"
- Prefer read-only probes first:
codex-linux-extension-host --json info
codex-linux-extension-host --json tabs
codex-linux-extension-host --json history --limit 10
Use browser-control commands only when requested:
create-tab,claim-tab,navigate,attach,cdp,detach,name-session,finalize-tabs, andturn-ended.Finalize session tabs after browser work, keeping only deliverable or handoff tabs. Then release controls for the turn:
codex-linux-extension-host --json finalize-tabs
codex-linux-extension-host --json turn-ended
Examples
List tabs:
codex-linux-extension-host --json tabs --session codex-manual --turn inspect
Navigate with a session tab:
codex-linux-extension-host --json navigate https://example.com --session codex-manual --turn nav
Finalize the session, keeping a tab for handoff:
codex-linux-extension-host --json finalize-tabs --session codex-manual --turn nav --keep 123:handoff
Evaluate JavaScript after claiming, creating, or navigating a tab:
codex-linux-extension-host --json cdp --tab-id 123 Runtime.evaluate --params '{"expression":"document.title","returnByValue":true}' --session codex-manual --turn inspect
Safety
Do not inspect cookies, passwords, local storage, or arbitrary Chrome profile files. Do not run raw CDP commands against logged-in sites unless the user asks for that browser action. Do not change the native messaging manifest to allow another extension ID without explicit approval.