fix(channels): forward elicit() and send_context_estimate() on AppChannel#6400
Merged
Conversation
…nnel impl Channel for AppChannel forwarded 18 Channel trait methods via dispatch_app_channel! but never overrode elicit() or send_context_estimate(), so both calls fell through to the trait's default methods instead of reaching CliChannel/TuiChannel's real, unit-tested implementations. elicit()'s default unconditionally returns Declined, so every MCP server-driven elicitation request was silently auto-declined in both CLI and TUI modes regardless of [mcp] elicitation_enabled. send_context_estimate()'s default silently no-ops, so the TUI's real-time context-usage estimate never reached the input block title. Add both missing overrides, following the existing dispatch_app_channel! pattern used by the other forwarded methods. Closes #6388
bug-ops
enabled auto-merge (squash)
July 17, 2026 15:52
bug-ops
force-pushed
the
fix/6388-mcp-elicitation-auto-decline
branch
from
July 17, 2026 15:52
be2abfd to
8628d4c
Compare
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.
Summary
impl Channel for AppChannel(src/channel.rs) forwarded mostChanneltrait methods viadispatch_app_channel!but never overrodeelicit()orsend_context_estimate(), so both calls silently fell through to the trait's default methods instead of reachingCliChannel/TuiChannel's real, already-unit-tested implementations.elicit()'s default unconditionally returnsDeclined, so every MCP server-driven elicitation request was auto-declined in both CLI and TUI modes regardless of[mcp] elicitation_enabled.send_context_estimate()'s default silently no-ops, so the TUI's real-time context-usage estimate never reached the input block title.dispatch_app_channel!pattern used by the other forwarded methods.[MCP server '...' is requesting input]banner and the real per-field prompt now fire, where previously the request was auto-declined in under 1ms with no visible indication.Note: this fix makes elicitation prompts reachable again, but a separate, pre-existing bug (#6398, filed during this fix's live verification) means the CLI accept path can race against the background chat-input reader for stdin and time out client-side — that is a distinct root cause, not caused by this change, and is tracked separately.
Closes #6388
Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 14007 passed, 0 failed, 35 skippedRUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --lockedcargo test --doc --workspace --features "desktop,ide,server,chat,pdf,scheduler"gitleaks protect --staged --no-banner --redact— no leaksapp_channel_forwards_elicit_to_real_implementation,app_channel_forwards_send_context_estimate_to_real_implementation), each independently revert-verified to fail (not pass vacuously) when its override is removed