Skip to content

[codex] Route OpenCode missing-session errors through Effect#22

Open
StiensWout wants to merge 1 commit into
staging/opencode-typed-session-errorsfrom
codex/fix/opencode-typed-session-errors
Open

[codex] Route OpenCode missing-session errors through Effect#22
StiensWout wants to merge 1 commit into
staging/opencode-typed-session-errorsfrom
codex/fix/opencode-typed-session-errors

Conversation

@StiensWout

Copy link
Copy Markdown
Owner

Summary

  • Route OpenCode missing and stopped session checks through Effect failures instead of synchronous throws.
  • Add focused coverage for missing-thread sendTurn and stopSession.

Root cause

OpenCodeAdapter checked session state with a synchronous helper inside Effect bodies, so missing sessions were thrown as defects instead of returned through the typed provider adapter error channel.

Impact

Missing or already-stopped OpenCode sessions now fail predictably through typed adapter errors. stopSession still uses its direct session lookup and preserves the existing cleanup behavior for stopped contexts.

Validation

  • PATH="$HOME/.vite-plus/bin:$PATH" vp test apps/server/src/provider/Layers/OpenCodeAdapter.test.ts
  • PATH="$HOME/.vite-plus/bin:$PATH" vp check
  • PATH="$HOME/.vite-plus/bin:$PATH" vp run typecheck

Co-authored-by: Codex <codex@openai.com>
@StiensWout

Copy link
Copy Markdown
Owner Author

@codex please review this PR.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Jun 23, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 240f155f47

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant