Skip to content

fix(mcpx): honour prompt.sampleTimeout for sampling questions (pin 41 → 40) - #11903

Merged
dezren39 merged 1 commit into
mainfrom
fix/mcpx-prompt-sample-timeout
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/mcpx-prompt-sample-timeout

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Before: prompt.sampleTimeout did nothing. Since #2004 removed the MCP sampling fallback from generate(), the value was copied into the consumer policy and never read; with model.timeout at 0, the sampling backend's question used the built-in 1m30s whatever the setting said.

After: with model.timeout unset, the sampling question lives for prompt.sampleTimeout, and only then for the built-in default. A new e2e probe shows MCPX_PROMPT_SAMPLE_TIMEOUT=1h moves the question's expiry from 1m30s to an hour; without the fix the probe fails with both at 1m30s. The exemption pin drops from 41 to 40.

How: brokerSamplerFor in internal/daemon/consumer.go reads the policy's PromptSampleTimeout between ModelTimeout and the default. The probe raises the question through /v1/intent with model.provider=sampling and reads its lifetime from elicit list.

Refs #8471


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

#2004 removed the MCP sampling fallback that read prompt.sampleTimeout,
leaving the setting parsed into the policy but never read: the sampling
backend's question fell back to the built-in default whenever
model.timeout was 0. It now falls back to prompt.sampleTimeout first.
A probe shows a 1h setting moves the question's expiry from 1m30s to an
hour. Drops the setting from the exemption list (pin 41 -> 40).

Refs #8471

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 18, 2026 20:32
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 20:32
@dezren39
dezren39 merged commit d6e2387 into main Nov 18, 2026
@dezren39
dezren39 deleted the fix/mcpx-prompt-sample-timeout branch November 18, 2026 20:32
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T20:34:07.993446Z 931089a Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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