app-server fails to build on main: stale `connection_id` reference in message_processor.rs

Resolved 💬 2 comments Opened Apr 14, 2026 by PremPrakashCodes Closed Apr 14, 2026

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

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗