fix(proxy): surface expired SSO sessions in OpenCode - #610
Draft
Filip-Stastny-Philips wants to merge 1 commit into
Draft
Filip-Stastny-Philips wants to merge 1 commit into
Filip-Stastny-Philips wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UserPromptSubmithook failures so expired SSO sessions cannot silently submit another OpenCode request.Root cause
The OpenCode shell hook discarded the parsed result from
codemie hook, including exit status 2 from the auth gate. The proxy also streamed stale-session responses unchanged, allowing Keycloak HTML to reach the OpenCode SSE/JSON parser and produce empty0-tokenturns withfinish: \"unknown\".Validation
npx vitest run src/agents/plugins/codemie-code-hooks/__tests__/shell-hooks-source.test.ts src/agents/plugins/opencode/__tests__/opencode-session-lifecycle.test.ts src/providers/plugins/sso/proxy/plugins/__tests__/sso-auth.plugin.test.ts— 29 passednpx tsc --noEmit— passedThe full unit suite currently reports three unrelated failures in existing
AgentCLI-model-sourceandBaseAgentAdaptertests when run with this local environment's active profile/model settings.Notes
origin/mainand pushed to the contributor fork.