Skip to content

fix(vscode): report a busy session as turn.agent_busy, not an internal error - #2798

Open
matthiasgoergens wants to merge 1 commit into
MoonshotAI:mainfrom
matthiasgoergens:fix/vscode-busy-message
Open

fix(vscode): report a busy session as turn.agent_busy, not an internal error#2798
matthiasgoergens wants to merge 1 commit into
MoonshotAI:mainfrom
matthiasgoergens:fix/vscode-busy-message

Conversation

@matthiasgoergens

Copy link
Copy Markdown

Related Issue

Resolve #2796

Problem

See linked issue. A prompt sent while a session is busy is rejected with a plain Error, which emitError maps to code internal, so the webview shows "Internal error occurred." for what is simply "a response is already being generated". When a turn wedges (see #1050), every subsequent message in that session shows the scary generic error with no hint about the real state.

What changed

SessionRuntime.runTurnAction and beginHostAction now throw KimiError("turn.agent_busy", ...) instead of a plain Error. emitError already special-cases KimiError, and the error table already maps turn.agent_busy → "A message is being sent. Please wait." — only the throw sites needed to change. Test expectations updated (kimi-runtime.test.ts, settings-store.test.ts) to assert the code and the user-facing message.

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 fix works.
  • Ran gen-changesets skill, or this PR needs no changeset. (changeset included: kimi-code patch)
  • Ran gen-docs skill, or this PR needs no doc update.

…l error

The busy rejections in SessionRuntime threw a plain Error, which
emitError maps to code "internal" and the webview renders as
"Internal error occurred." — alarming and wrong for what is simply
"a response is already being generated". Throw KimiError with the
existing turn.agent_busy code instead so the UI shows the mapped
"A message is being sent. Please wait." with the real detail attached.

Fixes MoonshotAI#2796
@changeset-bot

changeset-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b3fda7b

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

This PR includes changesets to release 1 package
Name Type
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

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.

[VSCode] Busy-session rejection is reported as "Internal error occurred." instead of the busy message

1 participant