Skip to content

fix(parser): surface task-notification wrapped in system-reminder (v2.1.234+) - #264

Open
delexw wants to merge 1 commit into
mainfrom
fix-issue-262
Open

fix(parser): surface task-notification wrapped in system-reminder (v2.1.234+)#264
delexw wants to merge 1 commit into
mainfrom
fix-issue-262

Conversation

@delexw

@delexw delexw commented Aug 23, 2026

Copy link
Copy Markdown
Owner

What

Claude Code v2.1.234 changed how between-turn background-task notifications are delivered: they now arrive fully wrapped in <system-reminder>...</system-reminder> tags, matching the wrapping mid-turn delivery already used, instead of the previous unwrapped <task-notification>...</task-notification> format.

is_user_noise() treats any user entry that both starts with <system-reminder> and ends with </system-reminder> as pure harness-reminder noise and drops it entirely. Once a task notification is wrapped this way, it matches that rule and gets silently dropped instead of surfacing as the informational System message it used to produce — losing the task's completed/failed/killed status from the trace view.

Fix

  • Added unwrap_system_reminder() in classify.rs, which strips a full <system-reminder>...</system-reminder> wrapper when the entire trimmed content is exactly that wrapper.
  • is_user_noise() now checks the unwrapped inner content for a <task-notification> prefix before treating a <system-reminder>-wrapped entry as noise, so it falls through instead of being dropped.
  • The existing TASK_NOTIFICATION_TAG dispatch in classify() also checks the unwrapped content, so the wrapped notification still classifies as a System message with the correct is_error status (failed → error, completed/killed → informational).
  • Plain reminders with no task-notification inside are unaffected and still dropped as before.

Tests

Added three regression tests in classify.rs:

  • a <task-notification> wrapped in <system-reminder> still classifies as a System message
  • a wrapped failed notification still sets is_error: true
  • a plain wrapped reminder (no task-notification) is still dropped as noise

Verification

  • npx tsc --noEmit, npx oxlint, npx oxfmt --check — clean
  • cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings — clean
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check — clean
  • vitest run — 498 passed
  • cargo test --manifest-path src-tauri/Cargo.toml — 690 passed (including the 3 new tests)
  • claude --debug -p "say hello" ran cleanly with no crash/panic in the trace-capture path

Fixes #262

….1.234+)

Claude Code v2.1.234 delivers between-turn background-task notifications
fully wrapped in <system-reminder> tags, matching mid-turn delivery.
is_user_noise() treated any entry starting and ending with
<system-reminder> as pure noise and dropped it, silently losing the
wrapped <task-notification>'s completed/failed/killed status instead of
surfacing the informational System message it produced when unwrapped.

Add unwrap_system_reminder() and use it in both is_user_noise() and the
TASK_NOTIFICATION_TAG dispatch so a wrapped task-notification still
classifies as a System message with the correct is_error status. Plain
reminders with no task-notification inside are still dropped as before.

Fixes #262
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.

[Compat] Claude Code v2.1.234: between-turn background task notifications now wrapped in <system-reminder> tags

1 participant