Skip to content

fix(capability): a product clash is a question for the user, not an error - #514

Closed
sarve-shreyas wants to merge 1 commit into
infra-capabilityfrom
fix/search-clash-ask-user
Closed

sarve-shreyas wants to merge 1 commit into
infra-capabilityfrom
fix/search-clash-ask-user

Conversation

@sarve-shreyas

Copy link
Copy Markdown
Collaborator

Stacked on infra-capability (PR #491); merge after it.

searchCapability refused an ambiguous request through the same refuse() path as a real failure, so clients rendered the product clash in red and agents narrated "the search failed" before asking the user. The clash is the expected outcome of an ambiguous request, not a fault.

The search still does not run — the gate is unchanged — but the outcome comes back as an ordinary result:

{ "status": "ask_user", "reason": "product_ambiguous", "message": "…",
  "routing_token": "…", "clarify": { "question": "Which product do you mean — …?", "shared": [...], "options": [...] } }

Measured on a live session: searchCapability on tm with "list all projects" and no user_words → "came back as a normal result, not a tool error… status: ask_user… Which product do you mean — Load Testing or Test Management or Test Reporting & Analytics?", and the agent stopped there.

Not changed here, same shape if wanted later: invokeCapability's permission_not_granted is also an expected pause returned as an error.

🤖 Generated with Claude Code

…rror

searchCapability refused an ambiguous request through the same path as a
real refusal, so every client rendered the clash in red and agents narrated
"the search failed" before asking. The search still does not run, but the
outcome now comes back as an ordinary result — status "ask_user", the
message, the routing token and the clarify block — and the products in the
question, its options and the mismatch text are named by title. Telemetry
counts it under ask_user_reason rather than refusal_reason; the tests that
detected the gate through isError detect it through status.

Stacked on infra-capability. Reapplies 04e267f, bb1a578, a349c75 and
39a71d6, which that branch reverted in c3f6965.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited), Workspace UI (inherited); Enforced overrides: Organization
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: 02928537-a2dd-496f-9e60-a2905ebe0cd5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@sarve-shreyas

Copy link
Copy Markdown
Collaborator Author

Closing for now; the clash-as-question change can be re-raised against main if wanted (branch fix/search-clash-ask-user keeps the commit).

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