codex - ✅(Solved) Fix app-server fails to build on main: stale `connection_id` reference in message_processor.rs [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17842Fetched 2026-04-15 06:27:18
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1cross-referenced ×1

cargo build on main (HEAD 706f830dc) fails to compile codex-app-server because codex-rs/app-server/src/message_processor.rs:754 references a connection_id binding that no longer exists in scope.

Error Message

error[E0425]: cannot find value `connection_id` in this scope
   --> app-server/src/message_processor.rs:754:17
    |
754 |                 connection_id.0,
    |                 ^^^^^^^^^^^^^ help: a tuple struct with a similar name exists: `ConnectionId`
    |
   ::: app-server/src/outgoing_message.rs:34:1
    |
 34 | pub(crate) struct ConnectionId(pub(crate) u64);
    | ----------------------------------------------- similarly named tuple struct `ConnectionId` defined here

error: could not compile `codex-app-server` (lib) due to 1 previous error

Root Cause

Commit 23d4098c0 (#17372, "app-server: prepare to run initialized rpcs concurrently") refactored MessageProcessor::dispatch_initialized_client_request and removed the local connection_id binding, but the analytics track_request call inside the GeneralAnalytics feature branch was not updated. The other two call sites in the same file that need connection_id inside the dispatch functions derive it from connection_request_id.connection_id (see lines 579 and 781).

Fix Action

Fix / Workaround

Commit 23d4098c0 (#17372, "app-server: prepare to run initialized rpcs concurrently") refactored MessageProcessor::dispatch_initialized_client_request and removed the local connection_id binding, but the analytics track_request call inside the GeneralAnalytics feature branch was not updated. The other two call sites in the same file that need connection_id inside the dispatch functions derive it from connection_request_id.connection_id (see lines 579 and 781).

PR fix notes

PR #2: app-server: fix stale connection_id reference in dispatch path

Description (problem / solution / changelog)

Summary

  • Fixes the compile error in codex-rs/app-server/src/message_processor.rs:754 introduced by #17372, which removed the local connection_id binding in dispatch_initialized_client_request but left the analytics track_request call referencing it.
  • Mirrors the other call sites in the same file by deriving the id from connection_request_id.connection_id. ConnectionId is Copy and connection_request_id is not moved until later in the function, so no additional local binding is required.

Fixes openai/codex#17842.

Test plan

  • cargo build --bin codex from codex-rs/ (previously failed with error[E0425]: cannot find value 'connection_id' in this scope, now succeeds)
  • cargo test -p codex-app-server

Changed files

  • codex-rs/app-server/src/message_processor.rs (modified, +1/-1)

Code Example

error[E0425]: cannot find value `connection_id` in this scope
   --> app-server/src/message_processor.rs:754:17
    |
754 |                 connection_id.0,
    |                 ^^^^^^^^^^^^^ help: a tuple struct with a similar name exists: `ConnectionId`
    |
   ::: app-server/src/outgoing_message.rs:34:1
    |
 34 | pub(crate) struct ConnectionId(pub(crate) u64);
    | ----------------------------------------------- similarly named tuple struct `ConnectionId` defined here

error: could not compile `codex-app-server` (lib) due to 1 previous error

---

cd codex/codex-rs
cargo build --bin codex
RAW_BUFFERClick to expand / collapse

Summary

cargo build on main (HEAD 706f830dc) fails to compile codex-app-server because codex-rs/app-server/src/message_processor.rs:754 references a connection_id binding that no longer exists in scope.

Error

error[E0425]: cannot find value `connection_id` in this scope
   --> app-server/src/message_processor.rs:754:17
    |
754 |                 connection_id.0,
    |                 ^^^^^^^^^^^^^ help: a tuple struct with a similar name exists: `ConnectionId`
    |
   ::: app-server/src/outgoing_message.rs:34:1
    |
 34 | pub(crate) struct ConnectionId(pub(crate) u64);
    | ----------------------------------------------- similarly named tuple struct `ConnectionId` defined here

error: could not compile `codex-app-server` (lib) due to 1 previous error

Repro

cd codex/codex-rs
cargo build --bin codex

The failure blocks building any target that depends on codex-app-server (including the codex bin).

Root cause

Commit 23d4098c0 (#17372, "app-server: prepare to run initialized rpcs concurrently") refactored MessageProcessor::dispatch_initialized_client_request and removed the local connection_id binding, but the analytics track_request call inside the GeneralAnalytics feature branch was not updated. The other two call sites in the same file that need connection_id inside the dispatch functions derive it from connection_request_id.connection_id (see lines 579 and 781).

Suggested fix

Mirror the existing pattern and use connection_request_id.connection_id.0 at line 754. ConnectionId is Copy and connection_request_id is not moved until later in the function, so no additional local binding is required.

PR to follow.

Environment

  • macOS Tahoe | 26.4.1
  • rustc 1.94.1

extent analysis

TL;DR

Update the track_request call in message_processor.rs to use connection_request_id.connection_id.0 instead of the non-existent connection_id binding.

Guidance

  • Review the changes made in commit 23d4098c0 to understand the refactoring of MessageProcessor::dispatch_initialized_client_request and how it affected the connection_id binding.
  • Verify that using connection_request_id.connection_id.0 at line 754 does not introduce any new issues or affect the functionality of the GeneralAnalytics feature.
  • Check the other call sites in the same file (lines 579 and 781) to ensure they are correctly deriving the connection_id from connection_request_id.connection_id.
  • Test the updated code to confirm that the compilation error is resolved and the codex-app-server builds successfully.

Example

// Update the track_request call to use connection_request_id.connection_id.0
track_request(connection_request_id.connection_id.0, ...);

Notes

This fix assumes that connection_request_id.connection_id is correctly set and available at the point of the track_request call. If this is not the case, additional changes may be required to ensure the correct connection_id is used.

Recommendation

Apply the suggested fix by updating the track_request call to use connection_request_id.connection_id.0, as this should resolve the compilation error and allow the codex-app-server to build successfully.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - ✅(Solved) Fix app-server fails to build on main: stale `connection_id` reference in message_processor.rs [1 pull requests, 2 comments, 2 participants]