Skip to content

feat(opencode): add single session status endpoint#29421

Closed
YOMXXX wants to merge 1 commit into
anomalyco:devfrom
YOMXXX:feat/session-status-endpoint
Closed

feat(opencode): add single session status endpoint#29421
YOMXXX wants to merge 1 commit into
anomalyco:devfrom
YOMXXX:feat/session-status-endpoint

Conversation

@YOMXXX
Copy link
Copy Markdown

@YOMXXX YOMXXX commented May 26, 2026

Issue for this PR

Closes #29166

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds GET /session/:sessionID/status for clients that need one session's runtime status without fetching and filtering the full /session/status map.

The endpoint follows the existing /session/:sessionID/... resource shape and delegates to SessionStatus.get(sessionID), so idle sessions return { "type": "idle" }. The OpenAPI scenario and generated JS SDK were updated; the v2 SDK now exposes session.getStatus(...).

How did you verify your code works?

  • PATH="$HOME/.bun/bin:$PATH" bun test test/server/httpapi-session.test.ts -t "serves read routes"
  • PATH="$HOME/.bun/bin:$PATH" bun test test/server/httpapi-session.test.ts
  • PATH="$HOME/.bun/bin:$PATH" bun run script/httpapi-exercise.ts --mode coverage --fail-on-missing --fail-on-skip
  • PATH="$HOME/.bun/bin:$PATH" bun run test:httpapi
  • PATH="$HOME/.bun/bin:$PATH" bun typecheck from packages/opencode
  • PATH="$HOME/.bun/bin:$PATH" bun typecheck from packages/sdk/js
  • git diff --check
  • PATH="$HOME/.bun/bin:$PATH" bun ./packages/sdk/js/script/build.ts

I also ran .husky/pre-push; it failed in the unrelated @opencode-ai/console-support package because local dependencies/types such as @solidjs/meta, @solidjs/router, solid-js, vite, and generated @opencode-ai/console-core/... modules were missing. The opencode and SDK checks above passed.

Screenshots / recordings

N/A - HTTP API and SDK change only.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate PRs Found

PR #29244: feat(api): add single-session status HTTP endpoint

PR #29165: fix(opencode): expose single session status endpoint

Both of these PRs appear to be closely related or potentially duplicating the work in the current PR #29421. You may want to review their status and see if they're addressing the same issue #29166 or if they're alternative approaches.

@thdxr thdxr closed this May 27, 2026
@anomalyco anomalyco deleted a comment from YOMXXX May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session status service has get() method but no single-session HTTP endpoint

2 participants