Repository navigation
Conversation
Add GET /session/:sessionID/status HTTP endpoint to query individual session runtime status (idle/busy/retry). The SessionStatus.Service.get() method already existed but was not exposed via HTTP API. Previously only a bulk /session/status endpoint was available, requiring clients to filter the full status map.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #29166
Type of change
What does this PR do?
The session status service already had a
get(sessionID)method for querying a single session's runtime status (idle/busy/retry), but it was only wired up to the bulk/session/statusendpoint which returns all non-idle statuses as a record. If you needed just one session status you had to fetch the entire list and filter client-side.This PR adds
GET /session/:sessionID/statusthat calls that existingget()method directly. It follows the same pattern as other single-session endpoints likeGET /session/:sessionID/todo— validate session existence withrequireSession(), then delegate to the service.Two files changed:
groups/session.ts— added route path and endpoint definitionhandlers/session.ts— added handler + registered in chainHow did you verify your code works?
Ran
opencode servelocally and hit the endpoint against a known session ID. Returns{ "type": "idle" }for inactive sessions and the correct busy/retry state for active ones.Screenshots / recordings
N/A, backend-only change.
Checklist