Skip to content

[codex] allow shared config reads in app-server queue#21340

Merged
xli-oai merged 2 commits into
mainfrom
xli-codex/shared-config-reads
May 7, 2026
Merged

[codex] allow shared config reads in app-server queue#21340
xli-oai merged 2 commits into
mainfrom
xli-codex/shared-config-reads

Conversation

@xli-oai
Copy link
Copy Markdown
Contributor

@xli-oai xli-oai commented May 6, 2026

Summary

  • add a shared-read serialization mode for global app-server request families
  • let consecutive leading shared reads for the same family run together while keeping exclusive requests ordered
  • mark only skills/list, config/read and plugin/list as shared reads for now

Why

skills/list and plugin/list are read-only config-family requests, but the app-server queue currently treats every config request as exclusive. That means one long skills/list can make a later plugin/list wait even though the two requests do not mutate config.

This change keeps the existing queue order but lets adjacent reads overlap. If a write is already waiting, later reads still stay behind it, so writes do not starve.

Scope

This intentionally keeps the first pass narrow:

  • shared reads: skills/list, plugin/list
  • still exclusive: plugin/install, marketplace/*, skills/config/write, config/*write, config/read, and the rest of the config family

Validation

  • just fmt
  • cargo test -p codex-app-server-protocol
  • cargo test -p codex-app-server
  • just fix -p codex-app-server-protocol
  • just fix -p codex-app-server

Desktop verification

I ran the dev desktop app against this branch's built binary with the existing UI timing logs enabled. The app did use /Users/xli/code/codex_6/codex-rs/target/debug/codex.

The new scheduler behavior works, but this narrow change does not remove every cold-start delay: in the observed trace, an earlier exclusive config/read was already queued ahead of the later skills/list and plugin/list requests, so the page-open plugin requests still waited behind that earlier exclusive config-family request before they could run together.

That means this PR is the scheduler primitive needed for shared reads, not the complete end-to-end latency fix by itself.

Not run

  • full workspace test suite, because repo policy requires explicit approval before running it after touching app-server-protocol

@xli-oai xli-oai added the oai PRs contributed by OpenAI employees label May 6, 2026 — with ChatGPT Codex Connector
@xli-oai xli-oai marked this pull request as ready for review May 6, 2026 22:55
@xli-oai
Copy link
Copy Markdown
Contributor Author

xli-oai commented May 6, 2026

@codex review

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed7a129ecc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/app-server-protocol/src/protocol/common.rs
@xli-oai
Copy link
Copy Markdown
Contributor Author

xli-oai commented May 6, 2026

@codex review

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed7a129ecc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/app-server-protocol/src/protocol/common.rs
@xli-oai xli-oai requested review from euroelessar and owenlin0 May 6, 2026 23:51
@xli-oai
Copy link
Copy Markdown
Contributor Author

xli-oai commented May 7, 2026

@codex review, skip comments any issues that you already commented

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@xli-oai xli-oai merged commit 05cd5c3 into main May 7, 2026
26 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 2026
@xli-oai xli-oai deleted the xli-codex/shared-config-reads branch May 7, 2026 06:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants