Oracle handoff for a huge codebase question
When a read-heavy question spans a large codebase and would burn your Codex token/rate budget. Offload the heavy analysis to a browser ChatGPT Pro Extended Thinking session via Oracle + PackX, then bring the returned plan back into Codex and implement locally.
Copy-paste prompt
You are my coding agent. I have a large, read-heavy question about this codebase and I want to offload the heavy analysis to a browser ChatGPT Pro session via Oracle + PackX instead of burning local tokens. Follow these steps exactly and do not skip the preview.
1. Bundle the relevant files with PackX. First PREVIEW so we see what gets included and the token estimate:
packx --preview -s "<TOPIC>"
When the preview looks right, write the bundle:
packx -s "<TOPIC>" -f markdown --no-interactive -o .notes/handoff-bundle.md
2. Send the bundle to ChatGPT Pro in the browser with extended thinking. The slug MUST be 3-5 kebab words:
ORACLE_MAX_FILE_SIZE_BYTES=12000000 oracle --engine browser --browser-thinking-time extended \
-p "<THE BIG ANALYSIS QUESTION>" \
--slug "<3-5-word-kebab-slug>" \
--write-output .notes/oracle-plan.md \
--file .notes/handoff-bundle.md
3. Read .notes/oracle-plan.md, then implement the plan locally and verify (run the tests/build). Treat this as a plan -> implement -> verify loop.
Guardrail: keep browser concurrency LOW โ no more than 2-3 Oracle browser requests at once.
How it works
packx --preview -s "<TOPIC>"shows the matched files and a token estimate before you commit โ always preview first so the bundle is scoped, not bloated.packx -s "<TOPIC>" -f markdown --no-interactive -o .notes/handoff-bundle.mdwrites a scripted markdown bundle (no prompts).oracle --engine browser --browser-thinking-time extendeddrives ChatGPT Pro in the browser with extended thinking;--write-outputsaves ONLY the final assistant message, and--fileattaches the bundle (cap raised viaORACLE_MAX_FILE_SIZE_BYTES=12000000).- The
--slugmust be 3-5 kebab words or Oracle rejects it. - The returned plan is the durable artifact: read it back into Codex, implement, then verify. Keep concurrency low (2-3 browser requests) to stay within ChatGPT Pro limits.
- Reference: John's Oracle fork, PackX.
Codex skilloracle-codebase-handoffInstall & forget
Save as ~/.agents/skills/oracle-codebase-handoff/SKILL.md (or your project's .agents/skills/), then restart Codex.
---
name: oracle-codebase-handoff
description: Trigger when a read-heavy question spans a large codebase and would burn Codex token/rate budget โ offload heavy analysis to a browser ChatGPT Pro session via Oracle + PackX, then resume implementation locally. Do NOT trigger for small, local edits.
---
# Oracle codebase handoff
Offload a big, read-heavy codebase analysis to a browser ChatGPT Pro session via Oracle + PackX, then bring the plan back and implement locally. Run as a plan -> implement -> verify loop.
## Steps
1. Bundle the relevant files with PackX. PREVIEW first to confirm scope and token estimate, then write the bundle:
```bash
packx --preview -s "<topic>"
packx -s "<topic>" -f markdown --no-interactive -o .notes/handoff-bundle.md
```
`-i` is a name/extension GLOB, not a path selector โ pass a known file/dir POSITIONALLY. Always `--preview` first; use `--no-interactive` for scripted bundles.
2. Send the bundle to ChatGPT Pro in the browser with extended thinking. The slug MUST be 3-5 kebab words, and the prompt text must start with `[<slug>]` on line 1, a blank line, then the question:
```bash
ORACLE_MAX_FILE_SIZE_BYTES=12000000 oracle --engine browser --browser-thinking-time extended \
-p "[<3-5-word-kebab-slug>]\n\n<the big analysis question>" \
--slug "<3-5-word-kebab-slug>" \
--write-output .notes/oracle-plan.md \
--file .notes/handoff-bundle.md
```
- `--engine browser` automates ChatGPT in the browser (GPT models).
- `--browser-thinking-time extended` sets ChatGPT thinking time (light|standard|extended|heavy).
- `--write-output` writes ONLY the final assistant message.
- `--file` attaches the bundle (size cap raised via `ORACLE_MAX_FILE_SIZE_BYTES`).
3. Read `.notes/oracle-plan.md`, then implement the plan locally and verify (tests/build).
## Guardrails
- Slug MUST be 3-5 kebab words or Oracle rejects it.
- Keep browser concurrency LOW โ no more than 2-3 Oracle browser requests at once.
- Do NOT use this for small, local edits โ only for read-heavy, large-codebase questions.