Skip to content

fix(web): fall back to session abort for stale prompts - #1043

Merged
wbxl2000 merged 3 commits into
mainfrom
codex/web-abort-session-fallback
Jun 23, 2026
Merged

fix(web): fall back to session abort for stale prompts#1043
wbxl2000 merged 3 commits into
mainfrom
codex/web-abort-session-fallback

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue. This fixes a web chat stop action race observed during streaming.

Problem

When the web client held a stale prompt_id, prompt-level abort could return aborted: false. The client treated that as handled and did not try the session-level abort fallback, so clicking Stop could appear to do nothing while the session was still running.

What changed

  • Fall back to session-level abort when prompt-level abort reports the cached prompt is missing or already completed.
  • Clear the stale cached prompt id before falling back.
  • Add regression coverage for stale prompt abort and successful prompt abort paths.
  • Add a patch changeset for the bundled web fix.

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.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Verification:

  • pnpm --filter @moonshot-ai/kimi-web typecheck
  • pnpm --filter @moonshot-ai/kimi-web exec vitest run --reporter=verbose
  • pnpm --filter @moonshot-ai/kimi-web build
  • git diff --check origin/main..HEAD
  • Read-only diff audit: No actionable findings.

Docs: no docs update needed; this restores the existing web Stop behavior without adding a new user-facing command or configuration.

@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 42deaa0

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 Jun 23, 2026

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

commit: 42deaa0

@wbxl2000
wbxl2000 merged commit 27df39c into main Jun 23, 2026
9 checks passed
@wbxl2000
wbxl2000 deleted the codex/web-abort-session-fallback branch June 23, 2026 14:05
@github-actions github-actions Bot mentioned this pull request Jun 23, 2026
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