fix: make MCP attachment and scope rotation reliable - #12
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f04710b60
ℹ️ 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".
- make the stdio entrypoint load its token exclusively from ROOM_TOKEN_FILE - cover inherited ROOM_TOKEN precedence with a regression test
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7fbfed216b
ℹ️ 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".
- separate stdio control-plane validation from HTTP deadline checks - preserve the HTTP MCP timeout contract with regression coverage
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Room now appears as a native MCP server in newly created Codex tasks, so typed form and URL elicitations render in the Codex UI instead of depending on a GUI process inheriting a bearer-token environment variable. A local stdio entrypoint reads the credential from a private token file and uses it only for authenticated Room API calls.
Credential scope expansion is now an explicit control-plane workflow rather than an unaudited token reissue. An authenticated human administrator must enter the exact workspace, repository, and agent scope plus
APPROVE; Room rotates the token and records the actor, subject, old scope, new scope, action, and timestamp atomically. Wildcards, automation identities, local-auth principals, and duplicate bootstrap issuance are rejected.The change was manually exercised from a fresh Codex task: all four Room tools were discovered through the plugin-backed stdio server and
room_analyze_planopened a native typed elicitation.Validation
go test ./...go test -race ./...go vet ./...buf lintgit diff --checkallow, analyzer statuscomplete(audit2de42186f2ff97f8370dc2b4d79a52f4)New concepts
The stdio MCP process is a local credential boundary: Codex starts it directly, while the process reads the Room token from a mode-restricted file and applies it only to upstream Room requests. This keeps MCP discovery and elicitation capabilities inside the native client/server session without requiring the desktop app to inherit secret environment state.
Use this pattern for trusted local MCP clients that need native protocol features and private upstream credentials. A remotely shared MCP service should continue to use transport-level authentication and centralized credential management instead.