Skip to content

fix(agent-core): treat dismissed AskUserQuestion as no answer, not recommended pick - #1550

Merged
RealKai42 merged 1 commit into
mainfrom
fix/ask-user-dismiss-prompt
Jul 11, 2026
Merged

fix(agent-core): treat dismissed AskUserQuestion as no answer, not recommended pick#1550
RealKai42 merged 1 commit into
mainfrom
fix/ask-user-dismiss-prompt

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

When a user dismisses an AskUserQuestion prompt (ESC / close), the tool description told the model to "proceed with your best judgment". In practice the model read this as "go with the option I marked (Recommended)", so a dismissal silently became an implicit selection of the recommended option instead of the user declining to answer.

What changed

Updated the model-facing AskUserQuestion tool description so a dismissed question (empty answers with a note) is described as the user choosing not to answer, with an explicit instruction not to treat it as selecting the recommended option and to decide based on context instead. The dismiss result payload and the web pre-selection behavior are unchanged. Added a patch changeset for @moonshot-ai/kimi-code.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works. (Prompt-only change; existing ask-user tests pass.)
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update. (No user-facing doc change needed for an internal prompt tweak.)

@changeset-bot

changeset-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2e07941

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 11, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@2e07941
npx https://pkg.pr.new/@moonshot-ai/kimi-code@2e07941

commit: 2e07941

@wbxl2000

Copy link
Copy Markdown
Collaborator Author
image

@RealKai42
RealKai42 merged commit f17a6ec into main Jul 11, 2026
11 checks passed
@RealKai42
RealKai42 deleted the fix/ask-user-dismiss-prompt branch July 11, 2026 08:01
@github-actions github-actions Bot mentioned this pull request Jul 11, 2026
sailist added a commit to sailist/kimi-code that referenced this pull request Jul 13, 2026
…th v1

- rewrite repeated tool call reminders to redirect instead of prohibit (port of v1 MoonshotAI#1518)
- simplify makeReminderText2 to (repeatCount), no longer echoing tool name and args
- treat dismissed AskUserQuestion as no answer, not the recommended pick (port of v1 MoonshotAI#1550)
- update toolDedupe test assertions and regenerate affected wire snapshots
sailist added a commit that referenced this pull request Jul 13, 2026
… with v1 (#1631)

* fix(agent-core-v2): surface provider rejection on post-refresh 401

- map a 401 that survives forced token refresh to PROVIDER_AUTH_ERROR
  carrying the provider's sanitized message, instead of a misleading
  AUTH_LOGIN_REQUIRED re-login prompt
- propagate provider auth errors through full compaction instead of
  wrapping them as compaction failure
- export sanitizeStatusErrorMessage for reuse

* fix(agent-core-v2): align repeat-reminder and AskUserQuestion copy with v1

- rewrite repeated tool call reminders to redirect instead of prohibit (port of v1 #1518)
- simplify makeReminderText2 to (repeatCount), no longer echoing tool name and args
- treat dismissed AskUserQuestion as no answer, not the recommended pick (port of v1 #1550)
- update toolDedupe test assertions and regenerate affected wire snapshots

* chore: add changeset for v2 reminder and question copy alignment

* fix(kap-server): drain in-flight heartbeat writes before unlinking the instance file

- count writes that passed the released check and await them in release()
  so their atomic rename cannot recreate the file after unlink
- harden the heartbeat test: 1ms cadence plus a post-release re-check
  catches the recreate-after-unlink race (verified failing on old code)

* docs(agent-core-v2): move toProviderAuthError rationale to the file header

Address Codex review: agent-core-v2 keeps comments in the top-of-file
header only, never beside functions
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