Skip to content

Add experimental app-server thread read-state updates - #52395

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/775f6e9584dc91bd3c2ee9a309144b5baf0edffa
Oct 9, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/775f6e9584dc91bd3c2ee9a309144b5baf0edffa

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Add experimental app-server thread read-state updates

Why

Clients need to mark threads read or unread without overwriting unseen results or another window's explicit mark.

What changed

Add thread/readState/update for eligible durable local threads, gated by initialize.capabilities.experimentalApi. Requests include threadId, expectedRevision, and an operation of {type:"read"} or {type:"unread"}.

Marking read clears firstUnread; marking unread sets it to threadStart. Successful updates return the read state and notify subscribers through thread/readState/changed. Both operations require an exact revision match. Stale requests return -32600 with readStateConflict and the current read state, requiring a fresh user action rather than a blind retry. Updates do not change thread recency.

Testing

Add app-server coverage for experimental capability gating, explicit unread marks and notifications, conflicts for both stale operations, and marking read with a fresh revision.

## Why

Clients need to mark threads read or unread without overwriting unseen results or another window's explicit mark.

## What changed

Add `thread/readState/update` for eligible durable local threads, gated by `initialize.capabilities.experimentalApi`. Requests include `threadId`, `expectedRevision`, and an operation of `{type:"read"}` or `{type:"unread"}`.

Marking read clears `firstUnread`; marking unread sets it to `threadStart`. Successful updates return the read state and notify subscribers through `thread/readState/changed`. Both operations require an exact revision match. Stale requests return `-32600` with `readStateConflict` and the current read state, requiring a fresh user action rather than a blind retry. Updates do not change thread recency.

## Testing

Add app-server coverage for experimental capability gating, explicit unread marks and notifications, conflicts for both stale operations, and marking read with a fresh revision.

GitOrigin-RevId: 775f6e9584dc91bd3c2ee9a309144b5baf0edffa
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/775f6e9584dc91bd3c2ee9a309144b5baf0edffa branch from 4ed77d0 to e45069d Compare October 9, 2026 03:42
@copyberry
copyberry Bot merged commit e45069d into main Oct 9, 2026
17 of 24 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-09T03:42:33.745554Z 4ed77d0 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/775f6e9584dc91bd3c2ee9a309144b5baf0edffa branch October 9, 2026 03:42
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026
@skyfackr
skyfackr deployed to issue-triage October 9, 2026 03:43 — with Image GitHub Actions Active
@skyfackr
skyfackr deployed to issue-triage October 9, 2026 03:43 — with Image GitHub Actions Active
@skyfackr
skyfackr deployed to issue-triage October 9, 2026 03:43 — with Image GitHub Actions Active
@skyfackr
skyfackr deployed to issue-triage October 9, 2026 03:45 — with Image GitHub Actions Active
@juniorWee
juniorWee deployed to issue-triage October 9, 2026 03:50 — with Image GitHub Actions Active
@juniorWee
juniorWee deployed to issue-triage October 9, 2026 03:50 — with Image GitHub Actions Active
@juniorWee
juniorWee deployed to issue-triage October 9, 2026 03:50 — with Image GitHub Actions Active
@AdamRealE
AdamRealE deployed to issue-triage October 9, 2026 03:56 — with Image GitHub Actions Active
@AdamRealE
AdamRealE deployed to issue-triage October 9, 2026 03:56 — with Image GitHub Actions Active
@AdamRealE
AdamRealE deployed to issue-triage October 9, 2026 03:56 — with Image GitHub Actions Active
@bjornbak
bjornbak deployed to issue-triage October 9, 2026 04:00 — with Image GitHub Actions Active
@bjornbak
bjornbak deployed to issue-triage October 9, 2026 04:00 — with Image GitHub Actions Active
@bjornbak
bjornbak deployed to issue-triage October 9, 2026 04:00 — with Image GitHub Actions Active
@bjornbak
bjornbak deployed to issue-triage October 9, 2026 04:01 — with Image GitHub Actions Active
@normhardy
normhardy deployed to issue-triage October 9, 2026 04:02 — with Image GitHub Actions Active
@normhardy
normhardy deployed to issue-triage October 9, 2026 04:02 — with Image GitHub Actions Active
@normhardy
normhardy deployed to issue-triage October 9, 2026 04:02 — with Image GitHub Actions Active
@normhardy
normhardy deployed to issue-triage October 9, 2026 04:03 — with Image GitHub Actions Active
@dbsanfte
dbsanfte deployed to issue-triage October 9, 2026 04:04 — with Image GitHub Actions Active
@dbsanfte
dbsanfte deployed to issue-triage October 9, 2026 04:04 — with Image GitHub Actions Active
@dbsanfte
dbsanfte deployed to issue-triage October 9, 2026 04:04 — with Image GitHub Actions Active
@Hendra827
Hendra827 deployed to issue-triage October 9, 2026 04:39 — with Image GitHub Actions Active
@Hendra827
Hendra827 deployed to issue-triage October 9, 2026 04:39 — with Image GitHub Actions Active
@Hendra827
Hendra827 deployed to issue-triage October 9, 2026 04:39 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:48 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:48 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:48 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:48 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:48 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:48 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:48 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:48 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:48 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:49 — with Image GitHub Actions Active
@andrewkangkr
andrewkangkr deployed to issue-triage October 9, 2026 04:49 — with Image GitHub Actions Active
@twotee007
twotee007 deployed to issue-triage October 9, 2026 05:06 — with Image GitHub Actions Active
@twotee007
twotee007 deployed to issue-triage October 9, 2026 05:06 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
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.