{
  "schemaVersion": "1",
  "revision": "22ce5d34dbcb5a78",
  "id": "foundations-oracle-context-routing",
  "slug": "oracle-context-routing",
  "title": "Route large codebase questions through Oracle",
  "summary": "Route huge, read-heavy codebase questions to a browser ChatGPT session instead of burning Codex quota; Bundle dense repo context with PackX and hand it off via Oracle + an MCP/browser automation bridge; Drive a plan → implement → verify loop with Oracle on a separate high-context session.",
  "category": "Context",
  "tags": [
    "Oracle",
    "PackX",
    "context",
    "quota"
  ],
  "sources": [
    {
      "label": "Agent foundations: Route large codebase questions through Oracle (authorized access required)",
      "url": "https://codex-workshop-followup.pages.dev/lesson-01.html"
    }
  ],
  "sourceUnits": [
    "oracle/lessons.json#01/objectives",
    "oracle/01-references.json#recap",
    "oracle/01-references.json#concepts/0",
    "oracle/01-references.json#concepts/1",
    "oracle/01-references.json#concepts/2",
    "oracle/01-references.json#concepts/3",
    "oracle/01-references.json#concepts/4",
    "oracle/01-references.json#concepts/5",
    "oracle/01-references.json#references",
    "oracle/01-references.json#recommendations",
    "oracle/01-interactive.json#intro",
    "oracle/01-interactive.json#checklist",
    "oracle/01-interactive.json#challenges",
    "oracle/01-interactive.json#quiz",
    "oracle/01-interactive.json#reflect",
    "oracle/01-references.json#goDeeper",
    "materials/exercises.md#Chunk-01",
    "materials/qa-index.md#Q001",
    "materials/qa-index.md#Q002",
    "materials/keyframes.md#Chunk-01",
    "lesson-01.html#resource-packet",
    "lesson-01.html#clip-map",
    "lesson-01.html#recording"
  ],
  "collection": "foundations",
  "categoryId": "context",
  "wordCount": 2309,
  "url": "/topics/foundations-oracle-context-routing/",
  "markdownUrl": "/markdown/foundations-oracle-context-routing.md?raw=1&v=22ce5d34dbcb5a78",
  "jsonUrl": "/api/v1/documents/foundations-oracle-context-routing.json",
  "headings": [
    {
      "id": "working-outcomes",
      "text": "Working outcomes",
      "level": 2
    },
    {
      "id": "concepts-and-consequences",
      "text": "Concepts and consequences",
      "level": 2
    },
    {
      "id": "codex-to-browser-quota-offloading",
      "text": "Codex-to-browser quota offloading",
      "level": 3
    },
    {
      "id": "chatgpt-pro-extended-context-window",
      "text": "ChatGPT Pro Extended context window",
      "level": 3
    },
    {
      "id": "oracle-browser-handoff",
      "text": "Oracle browser handoff",
      "level": 3
    },
    {
      "id": "packx-context-bundling",
      "text": "PackX context bundling",
      "level": 3
    },
    {
      "id": "mcp-browser-automation-bridge",
      "text": "MCP/browser automation bridge",
      "level": 3
    },
    {
      "id": "plan-implement-verify-loop",
      "text": "Plan, implement, verify loop",
      "level": 3
    },
    {
      "id": "reference-tools-and-resources",
      "text": "Reference tools and resources",
      "level": 2
    },
    {
      "id": "askoracle-sh",
      "text": "askoracle.sh",
      "level": 3
    },
    {
      "id": "john-lindquist-s-oracle-fork",
      "text": "John Lindquist's Oracle fork",
      "level": 3
    },
    {
      "id": "packx-pack-tool",
      "text": "PackX / pack tool",
      "level": 3
    },
    {
      "id": "model-context-protocol",
      "text": "Model Context Protocol",
      "level": 3
    },
    {
      "id": "recommendations-and-best-practices",
      "text": "Recommendations and best practices",
      "level": 2
    },
    {
      "id": "practice-and-acceptance-criteria",
      "text": "Practice and acceptance criteria",
      "level": 2
    },
    {
      "id": "checklist",
      "text": "Checklist",
      "level": 3
    },
    {
      "id": "design-a-codex-vs-oracle-routing-table",
      "text": "Design a Codex-vs-Oracle Routing Table",
      "level": 3
    },
    {
      "id": "recreate-a-small-oracle-pass",
      "text": "Recreate a Small Oracle Pass",
      "level": 3
    },
    {
      "id": "build-a-plan-implement-verify-loop",
      "text": "Build a Plan-Implement-Verify Loop",
      "level": 3
    },
    {
      "id": "questions-to-test-understanding",
      "text": "Questions to test understanding",
      "level": 2
    },
    {
      "id": "what-problem-is-john-mainly-trying-to-solve-with-the-oracle-chatgpt-browser-workflow",
      "text": "What problem is John mainly trying to solve with the Oracle + ChatGPT browser workflow?",
      "level": 3
    },
    {
      "id": "what-does-oracle-primarily-do-in-the-demonstrated-workflow",
      "text": "What does Oracle primarily do in the demonstrated workflow?",
      "level": 3
    },
    {
      "id": "in-the-oracle-packx-mcp-pattern-shown-in-the-demo-what-does-packx-primarily-contribute",
      "text": "In the Oracle + PackX + MCP pattern shown in the demo, what does PackX primarily contribute?",
      "level": 3
    },
    {
      "id": "what-is-the-safest-way-to-understand-the-workshop-s-claim-about-chatgpt-pro-extended-versus-codex-token-mechanics",
      "text": "What is the safest way to understand the workshop's claim about ChatGPT Pro Extended versus Codex token mechanics?",
      "level": 3
    },
    {
      "id": "what-practical-limit-did-john-mention-for-running-these-browser-based-requests",
      "text": "What practical limit did John mention for running these browser-based requests?",
      "level": 3
    },
    {
      "id": "reflection-prompts",
      "text": "Reflection prompts",
      "level": 2
    },
    {
      "id": "further-applications",
      "text": "Further applications",
      "level": 2
    },
    {
      "id": "applied-exercises",
      "text": "Applied exercises",
      "level": 2
    },
    {
      "id": "exercise-1-set-up-an-automated-remote-browser-prompt-agent",
      "text": "Exercise 1: Set Up an Automated Remote Browser Prompt Agent",
      "level": 3
    },
    {
      "id": "questions-and-answers",
      "text": "Questions and answers",
      "level": 2
    },
    {
      "id": "goal-is-causing-me-to-hit-my-rate-limits-any-ideas-on-how-to-optimize-the-token-usage-when-running-goal",
      "text": "/goal is causing me to hit my rate limits.  Any ideas on how to optimize the token usage when running goal?",
      "level": 3
    },
    {
      "id": "is-this-mcp-only-limited-to-chatgpt-or-can-we-also-use-gemini",
      "text": "Is this MCP only limited to ChatGPT, or can we also use Gemini?",
      "level": 3
    },
    {
      "id": "operational-playbooks",
      "text": "Operational playbooks",
      "level": 2
    },
    {
      "id": "recording-references",
      "text": "Recording references",
      "level": 2
    },
    {
      "id": "visual-reference-index",
      "text": "Visual reference index",
      "level": 3
    }
  ],
  "markdown": "# Route large codebase questions through Oracle\n\n> Original source pages and recordings require authorized access. The full article text here is public.\n\nThe practice is escaping Codex token and rate-limit pressure by separating huge read-only analysis from the interactive coding session. John shows that his ChatGPT Pro Extended browser session can accept far larger context than older sessions and, in his setup, does not consume the same Codex token budget; then he demonstrates Oracle plus PackX plus MCP/browser automation sending roughly 585,000 tokens from a codebase into ChatGPT on a separate Mac mini and bringing the result back into the workflow.\n\n## Working outcomes\n\n- Route huge, read-heavy codebase questions to a browser ChatGPT session instead of burning Codex quota\n- Bundle dense repo context with PackX and hand it off via Oracle + an MCP/browser automation bridge\n- Drive a plan → implement → verify loop with Oracle on a separate high-context session\n\n## Concepts and consequences\n\n### Codex-to-browser quota offloading\n\nJohn explains that dense, high-context questions can be sent to ChatGPT Pro Extended in the browser instead of spending Codex's interactive token and rate-limit budget. He describes this as useful for complicated questions where you want a large amount of packed context.\n\n**Why it matters:** Large repo-reading prompts can burn through Codex limits quickly. Routing the heavyweight analysis to the browser keeps Codex available for the parts of the workflow that need an agent to continue acting.\n\n### ChatGPT Pro Extended context window\n\nJohn says his $200-plan browser session exposes ChatGPT 5.5 Pro / Pro Extended with much longer context than before: he contrasts older ~50,000-token sessions with newer sessions that can take around a million tokens and often return in 10–15 minutes.\n\n**Why it matters:** The exact limits may change, but the taught idea is to notice that different surfaces have different context limits and to route work accordingly.\n\n### Oracle browser handoff\n\nOracle lets a current Codex session ask a browser session to do the heavy analysis: it packs things up, sends them to the browser, waits for the browser model to work, and then brings the result back into the coding session.\n\n**Why it matters:** This creates a handoff between a local agent workflow and a logged-in browser model without manually copying a massive prompt every time.\n\n### PackX context bundling\n\nIn the demo, John's Oracle PackX skill uses a pack tool to gather files related to a query. The run shown packs 45 files and reports roughly 585,000 tokens before sending the bundle to Oracle.\n\n**Why it matters:** PackX is the part of the workflow that turns scattered repo files into one large model-readable payload for the browser analysis pass.\n\n### MCP/browser automation bridge\n\nAfter the context is packed, the workflow makes an MCP call that reaches over to a browser on John's Mac mini, opens the ChatGPT session, inserts the prompt, and submits it.\n\n**Why it matters:** The MCP step is the bridge that lets the current agent trigger the outside browser workflow instead of requiring John to manually paste the packed prompt.\n\n### Plan, implement, verify loop\n\nJohn shows the broader pattern he uses: create a list of QA stories or goals, use Oracle to create a plan for each one, then implement it and verify it.\n\n**Why it matters:** The value is not just a one-off giant prompt; it is turning high-context planning into a repeatable loop that feeds back into actual code work.\n\n## Reference tools and resources\n\n### askoracle.sh\n\nPublic Oracle landing page shared in the workshop chat.\n\n**Use when:** Use it to understand the baseline Oracle concept before comparing it with John's workshop-specific fork.\n\n[Reference](https://askoracle.sh/)\n\n### John Lindquist's Oracle fork\n\nThe fork John points developers to for his specific setup, including browser mode, cookie debugging guidance, agents setup help, and the Oracle PackX skill.\n\n**Use when:** Use it when trying to study or reproduce the exact workflow John demonstrated.\n\n[Reference](https://github.com/johnlindquist/oracle)\n\n### PackX / pack tool\n\nThe context-packing layer used by John's Oracle PackX skill to gather relevant files and produce the large token bundle shown in the demo.\n\n**Use when:** Use it when you need Oracle to send a bundled codebase context prompt into the browser model.\n\n[Reference](https://github.com/johnlindquist/oracle)\n\n### Model Context Protocol\n\nThe tool-bridge mechanism John names when the packed request is handed off from the current agent workflow to the browser automation path.\n\n**Use when:** Use it as background for understanding the MCP call in the Oracle demo, not as a separate MCP configuration lesson from this section.\n\n[Reference](https://modelcontextprotocol.io/)\n\n## Recommendations and best practices\n\n- Use browser-side ChatGPT Pro Extended for huge, read-heavy codebase questions that would otherwise burn Codex context, but treat John's quota observations as his workshop setup rather than a permanent pricing or limit promise.\n- Use Oracle and PackX only when the request really needs a large repo bundle: PackX gathers the files, Oracle sends the bundle to the browser through MCP, and the answer comes back into the coding workflow.\n- Follow the fork's README, cookie-debugging, and agent setup guidance before trying to reproduce the browser workflow, because John says the setup is system-specific and may take effort.\n- Keep concurrency low. John says he would not run more than two or three browser requests at a time and has seen temporary pause popups after too many requests.\n- Shape repeat work as a loop: list the stories or goals, use Oracle to create a plan for each one, then implement and verify the result.\n\n## Practice and acceptance criteria\n\nPractice routing huge code-reading questions through an Oracle/PackX browser pass while keeping Codex focused on orchestration, implementation, and verification.\n\n### Checklist\n\n1. Identify one Codex request in your workflow that is mostly large-scale reading or planning rather than immediate local editing.\n2. Check whether your ChatGPT browser session and Codex session expose the same or different model surfaces, as John and the participants observed.\n3. Review askoracle.sh and John's Oracle fork, especially the README, cookie-debugging guidance, agents file, and Oracle PackX skill.\n4. Try the smallest version of the demo on a non-critical repo: ask for files related to one topic, let PackX build a bundle, and send it through Oracle/MCP to a browser session.\n5. Bring the returned plan back into your coding workflow and have Codex implement and verify one concrete item.\n6. Keep browser requests low-concurrency at first; use John's two-or-three-at-a-time guidance as the ceiling unless your own monitored setup proves otherwise.\n\n### Design a Codex-vs-Oracle Routing Table\n\n**Difficulty:** Medium\n\nFor one repo you actively use, list ten realistic AI requests and route each one to either the Codex session or an Oracle/browser analysis pass. Include a one-line reason for each route.\n\n**Done when:** Your table keeps local implementation and verification in the Codex workflow while moving huge read-only analysis to the Oracle/browser lane.\n\n### Recreate a Small Oracle Pass\n\n**Difficulty:** Hard\n\nUsing a small, non-critical repo, follow the Oracle fork guidance to send one topic-focused codebase question through the PackX → Oracle → MCP/browser path.\n\n**Done when:** You can point to the packed bundle/token count, the browser-submitted question, and the returned answer that came back into the workflow.\n\n### Build a Plan-Implement-Verify Loop\n\n**Difficulty:** Hard\n\nCreate three QA stories or goals for a repo. For each one, use Oracle to create the plan, then have the coding session implement the chosen change and verify it.\n\n**Done when:** Each story has an Oracle-generated plan, an implementation step, and a verification result.\n\n## Questions to test understanding\n\n### What problem is John mainly trying to solve with the Oracle + ChatGPT browser workflow?\n\n- **A.** Replacing all coding work with a workshop archive.\n- **B.** Moving dense, high-context analysis out of Codex so it does not burn the same Codex token and rate-limit budget.\n- **C.** Making Codex run tests faster by skipping browser sessions.\n- **D.** Avoiding the need to pack repository files at all.\n\n**Answer: B.** John frames the workflow as a way to send huge context to ChatGPT Pro Extended in the browser while preserving Codex's interactive budget for ongoing work.\n\n### What does Oracle primarily do in the demonstrated workflow?\n\n- **A.** It stores the workshop recording and screenshots for later search.\n- **B.** It replaces the local code editor.\n- **C.** It lets the current Codex session send packed context to a browser model and bring the result back.\n- **D.** It chooses the cheapest API model for every request.\n\n**Answer: C.** John describes Oracle as the bridge from the current Codex session to the browser: pack things up, send them to the browser, let the browser work, then bring the answer back.\n\n### In the Oracle + PackX + MCP pattern shown in the demo, what does PackX primarily contribute?\n\n- **A.** It decides which model is cheapest at runtime.\n- **B.** It packs relevant repository files into a large model-readable context bundle and estimates its size.\n- **C.** It runs the test suite after Codex applies changes.\n- **D.** It schedules workshop breaks.\n\n**Answer: B.** PackX is the context-packing layer: in the demo it gathers files related to the search topic and reports a roughly 585,000-token bundle.\n\n### What is the safest way to understand the workshop's claim about ChatGPT Pro Extended versus Codex token mechanics?\n\n- **A.** Assume browser-side work is permanently unlimited and free.\n- **B.** Treat the pricing and limits as a snapshot, but keep the architecture idea: separate high-context analysis from the Codex budget when possible.\n- **C.** Move all work out of Codex because Codex is only useful for small prompts.\n- **D.** Use browser automation specifically to bypass platform rules.\n\n**Answer: B.** The durable lesson is routing work across surfaces with different context and quota behavior. Account plans, rate limits, and platform behavior can change.\n\n### What practical limit did John mention for running these browser-based requests?\n\n- **A.** Never run more than one request per week.\n- **B.** Run as many parallel requests as possible because there are no pauses.\n- **C.** Keep it to about two or three at a time because too many requests can trigger a temporary pause.\n- **D.** Only run the workflow through the workshop archive.\n\n**Answer: C.** John says he has hit popups after too many requests and would not do more than two or three at a time.\n\n## Reflection prompts\n\n- Which of your current Codex requests are really huge-context reading or planning tasks?\n- Where would an Oracle browser pass be useful in your workflow, and where would it be overkill?\n- What concurrency limit would you set so browser automation remains monitorable and does not trigger the pause behavior John described?\n- Would a separate machine, browser profile, or dedicated screen make this workflow less disruptive for you, the way John's Mac mini did for him?\n\n## Further applications\n\n1. Read askoracle.sh to understand the general Oracle idea before studying John's fork.\n2. Review John's Oracle fork with attention to the README, cookie-debugging instructions, agents file, and Oracle PackX skill.\n3. Recreate the demonstrated flow on a small, non-critical repo: ask for files related to one topic, let PackX build the bundle, send it through Oracle, and compare the returned plan with what Codex can implement.\n4. Test your own account behavior cautiously with one browser request first, then increase only if you can monitor it and avoid the pause behavior John described.\n\n## Applied exercises\n\n### Exercise 1: Set Up an Automated Remote Browser Prompt Agent\n\n**Objective:**  Configure an isolated environment to programmatically inject codebase scripts into a standard browser instance using local session cookies.\n\n**Setup:** Clone the custom tracking engine fork from [https://github.com/johnlindquist/oracle](https://github.com/johnlindquist/oracle).Authenticate into an active web-based chat account inside your system's primary browser layout.\n\n**Task:** Execute the repository bundle scripts to pinpoint and read structural active authentication cookies (cookie debugging step).Use the provided automated templates via the repository agents instructions to link your workspace context directly with an active automation host loop.Execute a context collection command across a folder path of choice containing multiple files, ensuring the terminal processes and shifts token management completely to the browser interface window.\n\n**Acceptance Check:**  Verification is complete when text fields inside the separate browser app update and execute queries hands-free without using direct local API credentials.\n\n**Estimated Difficulty:**  Hard.\n\n## Questions and answers\n\n### /goal is causing me to hit my rate limits.  Any ideas on how to optimize the token usage when running goal?\n\nJohn addresses this broadly by showing how to move complex context out of direct local execution bounds and offloading it through the browser-driven Oracle process. This lets you execute large analytical loops outside your standard account limits.\n\n### Is this MCP only limited to ChatGPT, or can we also use Gemini?\n\nJohn details that his specific, customized structural additions in his personal fork focus heavily on ChatGPT integration because it bypasses the Codex quota. He notes the original baseline repository includes Gemini mechanics, though he hasn't personally validated that loop. However, since the engine operates by automating browser elements, it can theoretically hook any session (Perplexity, Devin, etc.) by extracting local browser session cookies.\n\n## Operational playbooks\n\n- [Oracle handoff for a huge codebase question](/topics/foundations-oracle-handoff-playbook/)\n\n- [Oracle + PackX Handoff Field Guide](/topics/foundations-oracle-packx-field-guide/)\n\n## Recording references\n\n- [Recording part 1](https://codex-workshop-followup.pages.dev/video/lessons/lesson-01-part-01.mp4)\n- [Recording part 2](https://codex-workshop-followup.pages.dev/video/lessons/lesson-01-part-02.mp4)\n\n[Timestamped source page](https://codex-workshop-followup.pages.dev/lesson-01.html)\n\n### Visual reference index\n\n- [00:11:18](https://codex-workshop-followup.pages.dev/lesson-01.html#clip-01-1): Visual reference at this recording position.\n- [00:21:55](https://codex-workshop-followup.pages.dev/lesson-01.html#clip-01-2): Visual reference at this recording position.\n- [00:23:48](https://codex-workshop-followup.pages.dev/lesson-01.html#clip-01-3): Visual reference at this recording position.\n- [00:10:55](https://codex-workshop-followup.pages.dev/lesson-01.html#clip-01-4): Visual reference at this recording position.\n- [00:11:40](https://codex-workshop-followup.pages.dev/lesson-01.html): Visual reference at this recording position. NotebookLM appears as context, not a taught implementation workflow.\n- [00:15:10](https://codex-workshop-followup.pages.dev/lesson-01.html): Visual reference at this recording position.\n- [00:19:28](https://codex-workshop-followup.pages.dev/lesson-01.html): Visual reference at this recording position.\n- [00:20:56](https://codex-workshop-followup.pages.dev/lesson-01.html): Visual reference at this recording position.\n- [00:22:25](https://codex-workshop-followup.pages.dev/lesson-01.html): Visual reference at this recording position.\n- [00:30:10](https://codex-workshop-followup.pages.dev/lesson-01.html): Visual reference at this recording position."
}
