Skip to content

Superseded#2483

Closed
lintowe wants to merge 1 commit intopingdotgg:mainfrom
lintowe:codex/codex-usage-indicator
Closed

Superseded#2483
lintowe wants to merge 1 commit intopingdotgg:mainfrom
lintowe:codex/codex-usage-indicator

Conversation

@lintowe
Copy link
Copy Markdown

@lintowe lintowe commented May 4, 2026

Superseded by #2484.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0e7b6a65-1a70-4943-978e-6e219dd83565

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels May 4, 2026
@lintowe lintowe closed this May 4, 2026
@lintowe lintowe deleted the codex/codex-usage-indicator branch May 4, 2026 00:40
@lintowe lintowe changed the title Add Codex usage indicator Superseded May 4, 2026
cause,
}),
),
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Critical Layers/CodexAdapter.ts:1690

In readCodexUsageWithoutSession, the runtime is used to call readAccountRateLimits without first calling runtime.start(). This skips the JSON-RPC initialize handshake, so the RPC call will fail when sent to an uninitialized server. The startSession function at lines 1442–1459 correctly calls runtime.start() after creating the runtime.

🤖 Copy this AI Prompt to have your agent fix this:
In file apps/server/src/provider/Layers/CodexAdapter.ts around line 1690:

In `readCodexUsageWithoutSession`, the `runtime` is used to call `readAccountRateLimits` without first calling `runtime.start()`. This skips the JSON-RPC `initialize` handshake, so the RPC call will fail when sent to an uninitialized server. The `startSession` function at lines 1442–1459 correctly calls `runtime.start()` after creating the runtime.

Evidence trail:
CodexAdapter.ts lines 1663-1706: `readCodexUsageWithoutSession` creates runtime (line 1670) and calls `runtime.readAccountRateLimits` (line 1691) without `runtime.start()`. CodexSessionRuntime.ts lines 1157-1160: `start()` performs `client.request("initialize", ...)` and `client.notify("initialized", undefined)`. CodexSessionRuntime.ts line 1293: `readAccountRateLimits: client.request("account/rateLimits/read", undefined)`. CodexAdapter.ts line 1442-1459: `startSession` correctly calls `runtime.start()`. CodexProvider.ts line 268-275: `probeCodexAppServerProvider` also calls `client.request("initialize", ...)` before other requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant