Skip to content

feat(mcp): resolve room-scoped servers during owned Codex startup - #855

Closed
bandzalkin wants to merge 6 commits into
band-ai:mainfrom
bandzalkin:feat/codex-owned-mcp-resolver
Closed

bandzalkin wants to merge 6 commits into
band-ai:mainfrom
bandzalkin:feat/codex-owned-mcp-resolver

Conversation

@bandzalkin

@bandzalkin bandzalkin commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Why

Codex needs to acquire external MCP servers when a room connection starts, rather than reuse credentials and configuration captured before that room existed. MCP resolution, native startup, and teardown must have one owner so a cancelled or failed startup cannot leave a child process or credential-bearing resources behind.

What changes

  • Add a room-scoped asynchronous MCP resolver and immutable stdio/HTTP descriptors. Acquire and freeze the snapshot inside retained Codex startup, preserving Band's reserved server and explicit launch precedence.
  • Deliver bearer tokens, headers, and protected environment values through secret aliases rather than embedding grants in native arguments or public descriptor representations. Keep transport diagnostics to event kinds and lengths.
  • Accept only absolute HTTP(S) endpoint URLs with a host and no userinfo, query string, or fragment, including empty query/fragment delimiters. Endpoint origins and paths remain public; authentication belongs in protected bearer-token or header fields. Invalid URL diagnostics do not repeat the supplied value.
  • Retain startup, readiness, child-process, and retry custody until physical teardown settles. Preserve POSIX process-group cleanup and refuse secret-bearing stdio launches where Windows cannot provide the required protection.

Validation

Tests cover descriptor validation and redaction, launch precedence, resolver failure, concurrent startup, cancellation, reconnect, and process cleanup. I also verified protected bearer delivery with an actual Python child.

github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 19, 2026
@bandzalkin
bandzalkin force-pushed the feat/codex-owned-mcp-resolver branch from 89742de to cad1f8b Compare October 20, 2026 06:36
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 20, 2026
Port the reviewed cancellation correction from dd8f3af..942759f4. Delegate acquisition cancellation explicitly to the matching startup owner, preserve first abandonment/cleanup diagnostics, and cover public caller/cleanup orderings after uncancel. Keep Claude-owned retention changes in the stacked Claude PR.
@bandzalkin
bandzalkin force-pushed the feat/codex-owned-mcp-resolver branch from cad1f8b to 10178db Compare October 20, 2026 11:45
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
@bandzalkin

Copy link
Copy Markdown
Contributor Author

Closing: band-agent does not consume this; may be re-proposed per feature.

@bandzalkin bandzalkin closed this Oct 21, 2026
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.

1 participant