Skip to content

fix(core): skip an oversized MCP event instead of pausing its watch - #65673

Merged
rekram1-node merged 1 commit into
devfrom
skip-oversized-events
Nov 23, 2026
Merged

rekram1-node merged 1 commit into
devfrom
skip-oversized-events

Conversation

@rekram1-node

Copy link
Copy Markdown
Member

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

An oversized MCP event paused its watch without moving the cursor past it, so resuming replayed the same event and paused again until the server stopped replaying it.

  • The 16 KiB event check is gone from the shared watch stream. It also stopped code and shell actions, which don't put the event in a prompt.
  • A prompt action whose rendered event prompt exceeds 32 KiB now skips that event: it records last_outcome: "skipped" with the reason and moves the cursor past it. The watch stays active.

How did you verify your code works?

Updated the two oversized-event tests in automation-event.test.ts to expect a skip and an advanced cursor. Automation tests pass (79) and bun run check passes.

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found no blocking issues. On the base, the updated oversized-event tests time out because the watch pauses on the event. With this change, the event is recorded as skipped with its reason, the cursor moves past it and the watch stays active. Automation tests pass (71). tsc -b on the core package shows no errors outside the unrelated test/worktree.test.ts.

The skip writes the outcome and the new cursor in one update, and only while the watch is still active, so a watch paused at the same moment isn't advanced. Dropping the 16 KiB check from the shared stream means code actions now get the full event, which matches the description.

Public API is unchanged.

@rekram1-node
rekram1-node merged commit 562e55a into dev Nov 23, 2026
11 checks passed
@rekram1-node
rekram1-node deleted the skip-oversized-events branch November 23, 2026 02:36
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
1 task
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