Commit Graph

4 Commits

Author SHA1 Message Date
Ahmed Ibrahim
cf890fd725 Annotate unsubscribe stabilization timer 2026-03-04 23:38:35 -08:00
Ahmed Ibrahim
2ce32a995a Stabilize thread unsubscribe request assertion 2026-03-04 22:11:03 -08:00
Ahmed Ibrahim
b3f11d668a Suppress cancelled turn follow-up requests 2026-03-04 20:33:30 -08:00
Owen Lin
21f7032dbb feat(app-server): thread/unsubscribe API (#10954)
Adds a new v2 app-server API for a client to be able to unsubscribe to a
thread:
- New RPC method: `thread/unsubscribe`
- New server notification: `thread/closed`

Today clients can start/resume/archive threads, but there wasn’t a way
to explicitly unload a live thread from memory without archiving it.
With `thread/unsubscribe`, a client can indicate it is no longer
actively working with a live Thread. If this is the only client
subscribed to that given thread, the thread will be automatically closed
by app-server, at which point the server will send `thread/closed` and
`thread/status/changed` with `status: notLoaded` notifications.

This gives clients a way to prevent long-running app-server processes
from accumulating too many thread (and related) objects in memory.

Closed threads will also be removed from `thread/loaded/list`.
2026-02-25 13:14:30 -08:00