Skip to content

[docs] Add Codex setup guide with startup_timeout_sec#95

Merged
justfinethanku merged 1 commit intoNateBJones-Projects:mainfrom
rumbitopi:contrib/rumbitopi/codex-setup-guide
Mar 24, 2026
Merged

[docs] Add Codex setup guide with startup_timeout_sec#95
justfinethanku merged 1 commit intoNateBJones-Projects:mainfrom
rumbitopi:contrib/rumbitopi/codex-setup-guide

Conversation

@rumbitopi
Copy link
Copy Markdown
Contributor

What does this do?

Adds OpenAI Codex as a named client in the getting-started guide (Step 7.4) with the exact config.toml snippet needed to connect.

The key finding: Codex's default MCP startup timeout is 10 seconds, but mcp-remote needs ~15-20s to establish the StreamableHTTP connection to a remote Supabase edge function. Without startup_timeout_sec = 30, Codex silently fails with:

⚠ MCP client for `open-brain` timed out after 10 seconds.

This is not documented anywhere and cost significant debugging time.

Requirements

  • OpenAI Codex (tested on v0.116.0)
  • Node.js (for npx/mcp-remote)

Testing

Tested on a personal Supabase deployment:

  • Codex without startup_timeout_sec → timeout error ❌
  • Codex with startup_timeout_sec = 30 → all 4 tools load ✅
  • Codex search_thoughts → returns results from shared brain ✅

Checklist

  • I have read CONTRIBUTING.md
  • No credentials or API keys in any file
  • Tested on my own Open Brain instance

Adds Section 7.4 for OpenAI Codex to the getting-started guide.
Codex uses mcp-remote via config.toml and requires
startup_timeout_sec = 30 to avoid a 10-second timeout during
mcp-remote's connection handshake. Without this, Codex reports
"MCP client for open-brain timed out" on every startup.

Renumbers the existing "Other Clients" section to 7.5.

Tested on Codex v0.116.0 with a personal Supabase deployment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@justfinethanku justfinethanku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of PR #95: [docs] Add Codex setup guide with startup_timeout_sec

What's Good

  1. Solves a real problem — The 10-second default timeout in Codex is undocumented and causes silent failures. This PR captures hard-won debugging knowledge that will save future users significant time.

  2. Well-tested — The PR author tested both failure and success cases on their own instance, which aligns with the "test before you submit" principle in CONTRIBUTING.md.

  3. Clear documentation — The CAUTION callout is appropriately used and explains both the symptom ("MCP client for open-brain timed out after 10 seconds") and the fix.

  4. Follows existing patterns — The contribution correctly uses:

    • Collapsible <details> block matching the other client sections
    • GitHub alert callout syntax (> [!CAUTION])
    • Consistent emoji prefix (🤖) for client sections
    • Sequential numbering that slots into the existing structure
  5. Minimal, surgical change — Only modifies what's necessary (adds one new section, renumbers one existing section). No scope creep.

Issues to Address

1. Category Mismatch (Significant)

This PR is titled [docs] but CONTRIBUTING.md specifies that contributions should use category prefixes from the contribution types: [recipes], [schemas], [dashboards], [integrations], [primitives], or [extensions].

Documentation updates to existing files in the docs/ folder are not a defined contribution category. Looking at recent merged PRs, I see that documentation-only changes to core docs use [docs] as a convention.

Resolution: This is actually fine. The [docs] prefix is used for updates to the main documentation files (getting-started.md, FAQ, etc.) rather than contributions to the contribution categories. This PR correctly uses [docs] since it's updating docs/01-getting-started.md.

2. No metadata.json Required

This PR does not need a metadata.json file because it's not adding a new contribution in recipes/, schemas/, etc. It's updating existing documentation. This is correct.

3. Format Consistency (Minor)

The new Codex section uses TOML format while the existing "Other Clients" section (7.4, soon to be 7.5) uses JSON format for mcp-remote configuration. This is correct — Codex uses TOML (~/.codex/config.toml) while other clients use JSON. No change needed.

4. Verification Missing (Nice-to-Have)

Unlike other step sections in the guide, the new Codex section doesn't end with a verification checkpoint. Compare with other client sections which end with "Restart [Client] and the four Open Brain tools should be available" or similar.

Suggested addition (after the CAUTION block):

**Verify it works:**
1. Restart Codex
2. Start a new conversation
3. You should see the four Open Brain tools available: `search_thoughts`, `list_thoughts`, `thought_stats`, `capture_thought`

Security & Safety Checks

  • ✅ No credentials or API keys (uses placeholder YOUR_PROJECT_REF and your-access-key-from-step-5)
  • ✅ No SQL changes
  • ✅ No binary files
  • ✅ No modifications to core Open Brain infrastructure
  • ✅ Scope limited to single documentation file

Automated Review Compliance

This PR would not be checked by the automated review workflow (.github/workflows/ob1-review.yml) because:

  1. It doesn't create a new contribution folder
  2. It only modifies existing documentation

The automated review rules are designed for new contributions in the category folders, not documentation updates. This is appropriate.

Recommendations

Required Changes: None

Nice-to-Haves:

  1. Add a verification step at the end of the new Codex section to match the pattern of other client sections
  2. Consider adding version info if the startup_timeout_sec parameter is specific to certain Codex versions

Final Notes

This is a high-quality, focused contribution that adds genuine value. The author did the debugging work, tested the solution, and documented it clearly. The CAUTION callout will save future users hours of confusion.

The PR follows the documentation style guide, uses appropriate formatting, and makes a minimal surgical change. It's exactly the kind of contribution that strengthens the Open Brain ecosystem.

Verdict: Ready to merge (with optional verification step enhancement if desired)

@justfinethanku justfinethanku merged commit 412f41c into NateBJones-Projects:main Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants