Skip to content

fix: publish task notifications as typed session failures - #1028

Open
nikita-ashihmin wants to merge 2 commits into
agentclientprotocol:mainfrom
nikita-ashihmin:codex/task-notification-session-failures
Open

fix: publish task notifications as typed session failures#1028
nikita-ashihmin wants to merge 2 commits into
agentclientprotocol:mainfrom
nikita-ashihmin:codex/task-notification-session-failures

Conversation

@nikita-ashihmin

@nikita-ashihmin nikita-ashihmin commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • publish structured task_notification events as negotiated AIR sessionFailure updates
  • replay trusted origin.kind = task-notification envelopes without exposing them as user_message_chunk
  • map only failed to error and stopped to warning, with stable identities and increasing revisions
  • suppress completed envelopes without creating a failure row
  • keep internal task ids, tool ids, output paths, notes, and results out of the failure payload
  • retain the existing replay behavior for clients without the sessionFailure capability

User-authored XML is not trusted and remains a user message.

Tracks IJAI-1225.

Related work

#941 also reads trusted task-notification messages, but uses them to close background-agent tool lifecycle records. It does not publish typed failures or remove the user bubble. Both changes intentionally use the SDK-provided origin as the trust boundary; the overlapping parser may need consolidation if #941 lands first.

Verification

  • npm run check
  • npm run build
  • env -u ANTHROPIC_BASE_URL npm run test:run — 971 passed, 27 skipped

Claude Code persists internal task notifications as user messages, so session
replay exposed failures as user-authored transcript entries. Publish trusted
failed and stopped notifications through the negotiated AIR sessionFailure
extension while retaining the legacy replay for clients without it.

IJAI-1225
Completed task notifications are internal delivery envelopes rather than
failures and may omit a summary. Recognize them without requiring failure text
so replay cannot expose them as user-authored messages.
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