Improve Intern MCP setup diagnostics - #3
Merged
Conversation
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.
Review on ArchCode
Problem and author intent
Intern MCP setup collapsed upstream HTTP and transport failures into “Intern rejected this access token,” so the production IAP interception was invisible. The hidden token prompt also gave no feedback that a paste arrived. This change adds privacy-safe diagnostics and visible, length-preserving secret entry without putting the bearer in shell history, host configuration, logs, or terminal output.
What changed
--verbosesetup parsing and propagated it through the real child MCP handshake.*per pasted character while preserving the original token internally.Companion infrastructure change: Firstlanding PR 10488.
Scope indicator
CLI/package only. No server API or frontend changes.
Risk assessment
Medium. The prompt and diagnostic paths handle a bearer credential. Risk is bounded by allowlisted fields, stderr-only diagnostics, secret-scanning assertions across the packaged setup flow, and real-PTY verification.
User impact
Users can run
setup --host codex --verboseorsetup --host claude --verboseto see actionable redacted request diagnostics. Pasting a token now visibly renders the correct number of stars, and cancellation exits with a clear error.Testing
scripts/harness-install-smoke.mjs, run throughnpm run test:harnesses(passed). It packs the artifact, installs it in an isolated home, crosses the real setup executable, MCP stdio child, loopback HTTP server, and real Codex/Claude configuration writers, then asserts successful identity/configuration and scans verbose stderr plus saved host configuration for request, response, and bearer secrets.npm run check— passed: formatting, lint, TypeScript build, 32 tests, and clean-consumer package smoke.Token entry cancelledwithout an unsettled-await warning.Follow-ups and known issues