Skip to content

Streamline MCP handlers#19496

Merged
pakrym-oai merged 1 commit intopakrym/appserver-errors-thread-resume-forkfrom
pakrym/appserver-errors-mcp
Apr 27, 2026
Merged

Streamline MCP handlers#19496
pakrym-oai merged 1 commit intopakrym/appserver-errors-thread-resume-forkfrom
pakrym/appserver-errors-mcp

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

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

@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-mcp branch from b9ce629 to 03c30b8 Compare April 25, 2026 03:09
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-thread-resume-fork branch from 58cf3c8 to 5308b02 Compare April 25, 2026 03:09
@pakrym-oai pakrym-oai changed the title Streamline MCP app-server handlers Streamline MCP handlers Apr 25, 2026
@pakrym-oai pakrym-oai marked this pull request as ready for review April 25, 2026 04:00
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-thread-resume-fork branch from 5308b02 to a548a0f Compare April 25, 2026 04:10
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-mcp branch from 03c30b8 to bdfcca9 Compare April 25, 2026 04:10
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-thread-resume-fork branch from a548a0f to d8792fc Compare April 25, 2026 04:15
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-mcp branch 2 times, most recently from 8056186 to f3290ec Compare April 26, 2026 23:08
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-thread-resume-fork branch from d8792fc to 67e573a Compare April 26, 2026 23:08
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-mcp branch from f3290ec to 3c9686e Compare April 26, 2026 23:15
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-thread-resume-fork branch from 67e573a to 9dfa99f Compare April 26, 2026 23:15
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-thread-resume-fork branch from 9dfa99f to eaf38ae Compare April 27, 2026 17:22
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-mcp branch 2 times, most recently from 0de7bb7 to ef966b4 Compare April 27, 2026 18:45
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-thread-resume-fork branch from 13117fc to 8053487 Compare April 27, 2026 20:38
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-mcp branch 2 times, most recently from 4d451bd to 9541603 Compare April 27, 2026 21:01
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-thread-resume-fork branch 2 times, most recently from 0f3ad06 to c55f80b Compare April 27, 2026 21:19
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-mcp branch from 9541603 to 0cc9bde Compare April 27, 2026 21:19
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-thread-resume-fork branch from c55f80b to b236a5e Compare April 27, 2026 21:31
@pakrym-oai pakrym-oai force-pushed the pakrym/appserver-errors-mcp branch from 0cc9bde to 867fb28 Compare April 27, 2026 21:31
@pakrym-oai pakrym-oai merged commit 11fa611 into pakrym/appserver-errors-thread-resume-fork Apr 27, 2026
37 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/appserver-errors-mcp branch April 27, 2026 21:50
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant