A Codex plugin that gives your agent a direct line to a logged-in ChatGPT Pro session.
Codex is great at execution. For the hard parts — architecture, system design, research synthesis, tradeoff calls, gnarly debugging strategy — you sometimes want a second, stronger brain. ChatGPT Pro Line lets a Codex agent phone that brain: it drives a real, logged-in ChatGPT Pro browser session, attaches your repo as context, sends a message, reads the answer, and writes a receipt — no API key, no password handling, no scraped cookies.
It's a phone line, not a scraper.
ChatGPT Pro line call:
Repo monofile attachment:
The strongest ChatGPT Pro reasoning isn't exposed on the API — it lives in the website. So this bridges to the website, deliberately and safely. The human stays logged in; the automation is text-only and deterministic; and every call is recorded to disk. You get Pro-level collaboration inside your Codex loop without handing an agent your credentials.
Use it for high-leverage work — architecture, specs, feature design, research synthesis, tradeoff review, cross-repo planning, and hard debugging strategy. Don't spend the line on trivial syntax checks.
- Repo-scoped rooms. ChatGPT conversations are bound to your git repo as
named rooms (
main,debug,critic,scratch). Linked worktrees share a repo's rooms; separate repos stay isolated.mainmeans this repo's main — never some other tab. - Repo-as-context, in one file. Generates a repomix-style
repo-context.mdmonofile (source tree, LOC, file bodies, line-range source map, hashes), blocks secret-like paths/content before writing it, and uploads it only after explicit confirmation. - One persistent, logged-in profile. A dedicated Chrome profile keeps you
logged in across calls and exposes CDP on
127.0.0.1:9222for deterministic control. - Multi-agent safe. A global browser-profile lock serializes every call, so concurrent Codex agents never collide in the same ChatGPT window.
- Receipts + verbatim thread-echo. Every call records the exact prompt and response (with SHA-256 hashes), selected model/intelligence, lock timing, conversation URL, a screenshot, and network/console logs.
- Visible history export. Pull a bound room's visible ChatGPT history to disk and reread it later without touching the browser — handy for picking up a human-started thread.
As a Codex plugin, from a local checkout:
npm install
npm run plugin:sync
codex --enable plugins plugin marketplace add "$PWD"
codex --enable plugins plugin add codex-chatgpt-pro-plugin@codex-chatgpt-pro-pluginFor source development, run the CLI directly:
./bin/chatgpt-pro init
./bin/chatgpt-pro doctor --warm # open the dedicated ChatGPT browser
# complete the visible login if prompted
./bin/chatgpt-pro doctor --live # verify login, composer, and model stateIf doctor --live reports auth.login_required (exit code 20), finish login
in the visible window and rerun chatgpt-pro doctor --live.
# First call into this repo's main room
chatgpt-pro call --alias=main --confirm-repo-context-upload --prompt="Review this repo's architecture and name the biggest risk."
# Inspect repo room / lock / cache state without touching the browser
chatgpt-pro status --alias=main
# Open a clean, independent critic room and review a file
chatgpt-pro rooms new --alias=critic
chatgpt-pro call --alias=critic --prompt-file=review.md
# Bind a ChatGPT thread you started by hand, then pull its history
chatgpt-pro rooms rebind --alias=spec --conversation-url=https://chatgpt.com/c/...
chatgpt-pro history export --alias=spec --last=20
# Re-point or fix a room's target after drift
chatgpt-pro rooms repair --alias=mainRoom lifecycle commands (rooms new, rooms rebind, rooms repair, and
rooms list/show) are repo-scoped, so the same alias can exist safely in
different repositories.
By default, call selects the live Pro intelligence level and detects when a
generated repo-context.md would help. Generated repo context is secret-scanned
and requires --confirm-repo-context-upload or
CHATGPT_CONFIRM_REPO_CONTEXT_UPLOAD=1 before it can be uploaded or inlined.
Use --repo-context=off / --no-repo-context or pass explicit scrubbed
--upload-file artifacts for narrower calls.
Codex agent
│ chatgpt-pro call --alias=main --prompt="…"
▼
chatgpt-pro CLI ──acquire──► global browser lock (one agent at a time)
│
▼
dedicated Chrome profile ──CDP──► chatgpt.com (you are logged in)
│ • attach repo-context.md │ Pro thinks + answers
│ • type prompt (Input.insertText) ▼
└────────────────────────► read the newest assistant turn (anchored)
│
▼
.devspace/runs/<id>/ receipt.json · transcript.md · final.png
The canonical message path is text-only: DOM focus for the composer, CDP
Input.insertText for the text, and a DOM button click to send. No OS-level
mouse/keyboard automation, no voice or dictation.
- You own the login. Automation never types a password, OTP, or solves a CAPTCHA, and never reads cookies or session storage. If login is needed, it stops and asks you.
- Text-only, no OS automation. No synthetic OS mouse/keyboard, no voice. A
test:non-interferencegate enforces the boundary. - One profile, one lock. A global browser-profile lock means concurrent agents serialize cleanly instead of fighting over the window.
- Fails closed. Ambiguous provenance produces a stable error code
(
auth.login_required,lock.busy,response.possibly_stale, …) — never a guessed answer. - On the record. The verbatim prompt and response, hashes, a screenshot, and
network/console logs land in
.devspace/runs/<id>/for every call.
Interactive Codex use keeps the exchange in the Codex session log. call prints
this block by default — paste it verbatim, don't summarize:
## Message Sent To ChatGPT Pro
...
## Message Received From ChatGPT Pro
...The installed plugin exposes the chatgpt-pro-line skill and the chatgpt-pro
CLI. Inside this source repo the same behavior is available via npm run:
| Command | What it does |
|---|---|
npm run chrome / chrome:headless / chrome:debug |
Launch the dedicated ChatGPT browser (visible / headless / verbose) |
npm run cdp:smoke |
Verify /json/version and /json/list |
npm run levels:list / levels:set -- --level=Pro |
Read or select the live intelligence level |
npm run choices:set -- --model=5.4 |
Select the live model |
npm run rooms:list |
List repo-owned rooms (no CDP) |
npm run context:bundle -- --name=focused |
Build the repo-context monofile |
npm run chatgpt:call -- --alias=main --message-file=prompt.md |
Source-repo alias for chatgpt-pro call |
npm run history:export -- --alias=spec --last=20 |
Export visible history |
npm run plugin:sync |
Refresh the materialized install bundle |
Common runtime switches: BROWSER_POSTURE=headed|headless,
CHATGPT_DEFAULT_LEVEL (default Pro), CHATGPT_RESPONSE_TIMEOUT_MS
(default 240000), CHATGPT_REPO_CONTEXT_MODE=auto|upload|inline|off,
CHATGPT_CONFIRM_REPO_CONTEXT_UPLOAD=1, CHATGPT_LOCK_TIMEOUT_MS (default
600000), BROWSER_OBSERVER=1 (print a run-inspector URL). See the contract
docs for the full list.
npm run test:v1 # deterministic package gate (no browser, no login)
npm run test:live # live browser proof suite (needs a logged-in ChatGPT)npm test: runs deterministic tests only — it does not require Chrome or a logged-in ChatGPT website session.npm run test:v1adds the v1 readiness gate on top of the deterministic suite.npm run test:plugin-installproves the materialized plugin installs into a fresh Codex home from the local marketplace entry.npm run test:livedrives the real website: doctor, history export, room rebind/repair, and the repo/thread isolation matrix.- Live proof scripts are
live:doctor,live:history-export,live:rooms-rebind,live:rooms-repair, andlive:repo-thread-matrix.
- docs/chatgpt-call-contract.md — the full call contract: rooms, context tiers, concurrency, receipts, and the complete failure-code list.
- docs/subagent-browser-contract.md — the lower-level browser, login-boundary, and CDP details.
bin/chatgpt-pro,src/,scripts/— the CLI, runtime, and self-tests.skills/,.codex-plugin/,.agents/plugins/marketplace.json— the Codex plugin surface.plugins/codex-chatgpt-pro-plugin/— the materialized install bundle, kept in sync from the root bynpm run plugin:sync(don't edit it by hand).
MIT © Haptica.

