Skip to content

app-server: expose loaded thread status via read/list and notifications#11786

Merged
euroelessar merged 9 commits intomainfrom
ruslan/thread-watch
Feb 18, 2026
Merged

app-server: expose loaded thread status via read/list and notifications#11786
euroelessar merged 9 commits intomainfrom
ruslan/thread-watch

Conversation

@euroelessar
Copy link
Contributor

@euroelessar euroelessar commented Feb 13, 2026

Motivation

  • Today, a newly connected client has no direct way to determine the current runtime status of threads from read/list responses alone.
  • This forces clients to infer state from transient events, which can lead to stale or inconsistent UI when reconnecting or attaching late.

Changes

  • Add status to thread/read responses.
  • Add statuses to thread/list responses.
  • Emit thread/status/changed notifications with threadId and the new status.
  • Track runtime status for all loaded threads and default unknown threads to idle.
  • Update protocol/docs/tests/schema fixtures for the revised API.

Testing

  • Validated protocol API changes with automated protocol tests and regenerated schema/type fixtures.
  • Validated app-server behavior with unit and integration test suites, including status transitions and notifications.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@euroelessar
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Feb 13, 2026
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Feb 13, 2026
@euroelessar euroelessar changed the title app-server: add robust thread/watch state view for loaded threads app-server: expose loaded thread status via read/list and notifications Feb 17, 2026
@euroelessar euroelessar force-pushed the ruslan/thread-watch branch 2 times, most recently from 386c757 to b6a2846 Compare February 17, 2026 20:08
Motivation
- Today, a newly connected client has no direct way to determine the current runtime status of threads from read/list responses alone.
- This forces clients to infer state from transient events, which can lead to stale or inconsistent UI when reconnecting or attaching late.

Changes
- Add `status` to `thread/read` responses.
- Add `statuses` to `thread/list` responses.
- Emit `thread/status/changed` notifications with `threadId` and the new status.
- Track runtime status for all loaded threads and default unknown threads to `idle`.
- Update protocol/docs/tests/schema fixtures for the revised API.

Testing
- Validated protocol API changes with automated protocol tests and regenerated schema/type fixtures.
- Validated app-server behavior with unit and integration test suites, including status transitions and notifications.
#[serde(rename_all = "camelCase")]
#[ts(rename_all = "camelCase")]
Active {
active_flags: Vec<ThreadActiveFlag>,
Copy link
Collaborator

@owenlin0 owenlin0 Feb 18, 2026

Choose a reason for hiding this comment

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

it's not possible to be both WaitingOnApproval AND WaitingOnUserInput is it? is it possible to flatten the status to be

NotLoaded
Idle
SystemError
Running
WaitingOnApproval
WaitingOnUserInput

?

also, do we need Idle + system_error? What's that scenario?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm, I've read more, and I think it's indeed not possible, but only due to user input tool spec not being marked as parallel
do we want to provide the guarantee that "model is not allowed to continue executing commands to research further while user is thinking on the response" forever? or how do we make that change in backward-compatible way?

on the other note, I'm okay to decouple SystemError from Idle, it's pretty self-container and is auto-cleared on status change anyway

@euroelessar euroelessar merged commit 1f54496 into main Feb 18, 2026
100 of 111 checks passed
@euroelessar euroelessar deleted the ruslan/thread-watch branch February 18, 2026 23:20
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2026
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.

4 participants