Skip to content

provider-claude-code: unknown custom entry type agent-session-bridge-state floods sdk/unknown log #2319

Description

@burningportra

Summary

visibility.ts in provider-claude-code parses every sdk/message entry. When the entry has type: "custom" with an unrecognized customType, the switch has no case and falls through to { kind: "sdk/unknown" }, which is logged heavily.

Symptom

High-frequency "SDK Unknown / Raw event: sdk/unknown" noise that looks alarming but is harmless. The parsed switch in parseClaudeRawEvent fails on entries like:

{
  "jsonrpc": "2.0",
  "method": "sdk/message",
  "params": { "message": { "type": "custom", "customType": "agent-session-bridge-state", ... } }
}

Cause

agent-session-bridge-state is a custom entry emitted by the session-bridge extension running inside Claude Code threads (it mirrors tracked sessions to local JSONL — see the mirrorPath field in the payload). It fires frequently on thread/agent state changes, so any active session with the bridge installed generates constant unknown logs.

Suggested

Add a known, inert case for this customType (or treat unrecognized custom entries as non-repeating/noise) so they don't surface as sdk/unknown — similar to how command_lifecycle and assistant are handled. These custom bridge-state entries carry no assistant content, so a dedicated case that ignores content solves the noise.

No changes were needed in the consuming plugin (bb-plugin-prompt-suggester) — root cause is entirely in the provider parser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    provider-claude-codeBuilt-in plugin: provider-claude-codeprovidersCross-provider bridges, models, login

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions