Repository navigation
Streamline thread resume and fork handlers - #19495
Merged
Merged
Conversation
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-read
branch
from
April 25, 2026 03:09
f0dde8e to
7799914
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-resume-fork
branch
from
April 25, 2026 03:09
58cf3c8 to
5308b02
Compare
pakrym-oai
marked this pull request as ready for review
April 25, 2026 04:00
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-read
branch
from
April 25, 2026 04:10
7799914 to
fd812db
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-resume-fork
branch
2 times, most recently
from
April 25, 2026 04:15
a548a0f to
d8792fc
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-read
branch
2 times, most recently
from
April 26, 2026 23:08
a48337c to
cdb702f
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-resume-fork
branch
from
April 26, 2026 23:08
d8792fc to
67e573a
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-read
branch
from
April 26, 2026 23:15
cdb702f to
eea7c29
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-resume-fork
branch
from
April 26, 2026 23:15
67e573a to
9dfa99f
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-resume-fork
branch
from
April 27, 2026 17:22
9dfa99f to
eaf38ae
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-read
branch
from
April 27, 2026 18:45
820705f to
5b5b247
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-resume-fork
branch
from
April 27, 2026 18:45
eaf38ae to
13117fc
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-read
branch
from
April 27, 2026 20:38
5b5b247 to
eb6945d
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-resume-fork
branch
from
April 27, 2026 20:38
13117fc to
8053487
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-read
branch
from
April 27, 2026 21:01
eb6945d to
d75151a
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-resume-fork
branch
2 times, most recently
from
April 27, 2026 21:19
0f3ad06 to
c55f80b
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-read
branch
from
April 27, 2026 21:19
d75151a to
0a6b2e1
Compare
pakrym-oai
force-pushed
the
pakrym/appserver-errors-thread-resume-fork
branch
from
April 27, 2026 21:31
c55f80b to
b236a5e
Compare
## Why The MCP request handlers had repeated local JSON-RPC error emission around validation and manager calls. Returning those errors directly makes the normal response path much easier to scan. ## What Changed - Streamlined model list, experimental feature list, MCP refresh, status, OAuth, resource read, and tool call handlers in `codex-rs/app-server/src/codex_message_processor.rs`. - Kept existing error codes and messages while replacing nested `send_error`/`return` branches with returned JSON-RPC errors where that flattens control flow. - Preserved MCP tool-call metadata behavior. ## Verification - `cargo check -p codex-app-server` - `cargo test -p codex-app-server --test all v2::mcp_resource -- --test-threads=1` - `cargo test -p codex-app-server --test all v2::mcp_tool -- --test-threads=1` - `cargo test -p codex-app-server --test all v2::mcp_server_status -- --test-threads=1`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Thread resume and fork had some of the deepest error-handling indentation in this area because helpers emitted request errors directly. Returning those failures gives the handlers a single request boundary while preserving the async pending-resume behavior.
What Changed
codex-rs/app-server/src/codex_message_processor.rsto returnResultvalues for validation and view loading failures.Verification
cargo check -p codex-app-servercargo test -p codex-app-server --test all v2::thread_resume -- --test-threads=1cargo test -p codex-app-server --test all v2::thread_fork -- --test-threads=1