Superseded#2483
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
| cause, | ||
| }), | ||
| ), | ||
| ); |
There was a problem hiding this comment.
🔴 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.
Superseded by #2484.