Skip to content

feat(mcp): expose thread model selection - #10557

Merged
juliusmarminge merged 2 commits into
agents/mcp-thin/questionsfrom
agents/mcp-thin/configuration
Sep 7, 2026
Merged

feat(mcp): expose thread model selection#10557
juliusmarminge merged 2 commits into
agents/mcp-thin/questionsfrom
agents/mcp-thin/configuration

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 7, 2026

Copy link
Copy Markdown
Member

Part 7/16 of the shared-core and MCP stack. Based on #10556. Next: #10558.

Read thread configuration and change the calling thread provider/model/options through existing selection and switch commands.

This intentionally limits writes to the caller. Permission-mode changes, cross-thread configuration and multi-command retry transactions are separate work. Provider/model discovery already exists in orchestrator_capabilities.

The command choice is now shared with client-runtime through modelSelectionCommandType; MCP does not maintain a separate provider comparison.

MCP-only rebuild of #8695, preserving attribution to Julius Marminge's original work. Original branches remain available for separate service follow-ups.

Validation: The composed stack passes 94 tests across 12 focused files, including shared core MCP and real MCP/V2 integration, attachment intake, project RPC/service contracts, and client model command selection. Server/contracts/shared/client-runtime typechecks and targeted format/lint/diff checks pass. New behavior coverage lives with the shared operation; no per-tool mock suite was added. Current-head CI is shown below.

Layer size: 4 files, +59/-0. No domain-service production implementation or documentation files change in this MCP layer.

Prepared with Codex in the OpenAI agent runtime.

Note

Add t3_thread_configuration and t3_thread_configure MCP tools for thread model selection

  • Adds a read-only t3_thread_configuration tool that returns the calling thread's ID, model selection, runtime mode, and interaction mode
  • Adds a destructive t3_thread_configure tool that dispatches a model-selection command to the current writable thread without changing permission modes or other threads
  • Registers both tools in ThreadToolkit, adds t3_thread_configuration to the Claude read-only allowlist, and adds display-name entries in the T3 MCP presentation map
  • Risk: t3_thread_configure opens the current thread for writing and dispatches a command; callers that invoke it concurrently may interleave sequence numbers. Reviewers should check ThreadToolkitHandlersLive configure handler in handlers.ts for dispatch and error-mapping behavior

Macroscope summarized b0152bc.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 7, 2026
@juliusmarminge juliusmarminge changed the title feat(mcp): expose current thread model selection feat(mcp): expose thread model selection Sep 7, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds new MCP tools, including a mutating tool that changes the calling thread's model or provider and can invoke existing provider-switch orchestration. The implementation is localized, but the new MCP dispatch branches lack direct behavioral coverage, so the change warrants human review.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

No code changes detected at b0152bc. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for b0152bc.

This comment will update automatically after the next completed run.

@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/configuration branch from 044770f to 5c8ac23 Compare September 7, 2026 19:44
Comment thread apps/server/src/mcp/toolkits/thread/handlers.ts
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/configuration branch from 5c8ac23 to 8b921b1 Compare September 7, 2026 20:39
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/configuration branch 2 times, most recently from 453c17a to 64b3608 Compare September 7, 2026 20:48
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/configuration branch from 64b3608 to b0152bc Compare September 7, 2026 20:55
@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@juliusmarminge
juliusmarminge merged commit ddef913 into t3code/codex-turn-mapping Sep 7, 2026
33 of 45 checks passed
@juliusmarminge
juliusmarminge deleted the agents/mcp-thin/configuration branch September 7, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant