Skip to content

fix(happy-cli): return 404 for OAuth metadata discovery paths#810

Open
memepilot wants to merge 1 commit intoslopus:mainfrom
memepilot:codex/fix-oauth-metadata-500
Open

fix(happy-cli): return 404 for OAuth metadata discovery paths#810
memepilot wants to merge 1 commit intoslopus:mainfrom
memepilot:codex/fix-oauth-metadata-500

Conversation

@memepilot
Copy link

@memepilot memepilot commented Mar 4, 2026

Summary

  • return HTTP 404 for /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource* on the local Happy MCP server
  • return 404 for non-root paths so unsupported probes do not surface as 500
  • add unit tests for request-path parsing and OAuth discovery path detection

Why

Codex MCP OAuth discovery treats 404 as "no OAuth" and continues, but non-404 (like 500) aborts startup. This change prevents local authless Happy MCP from failing with: HTTP 500 trying to load OAuth metadata.

Testing

  • Added: src/claude/utils/startHappyServer.test.ts
  • Not run in this environment (missing yarn/corepack binaries).

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.

2 participants