Skip to content

Requests stuck in "streaming" state and tokens not displaying in dashboard (Web API / OAuth auth) #1

@Obidin7

Description

@Obidin7

When using claude code routed through cc-wiretap, the dashboard UI shows all requests permanently stuck with the loading/refresh icon (status remains "streaming"). Furthermore, the token usage is not displayed.

However, the claude code CLI itself works perfectly fine, successfully receives the full responses, and completes the tasks. The issue is purely visual within the cc-wiretap dashboard.

Steps to Reproduce:

Run cc-wiretap.

Authenticate claude code using the browser (OAuth / Web session) rather than a standard Developer API key.

Send any prompt via the CLI.

Open the cc-wiretap web dashboard.

Observe the request list.

Expected Behavior:
Once claude code finishes receiving the response, the dashboard should mark the request as completed (stop the loading spinner). If the internal/web API does not provide token usage data, it should gracefully handle the absence of this data rather than hanging in the streaming state.

Actual Behavior:

The terminal logs show the connection opening: → [id] claude-opus-4-6 X messages + Y tools streaming.

The dashboard spinner loops infinitely.

Token usage is not calculated or shown.

Additional Context / Possible Cause:
Looking at the model names in the logs (claude-opus-4-6, claude-sonnet-4-6), this occurs when utilizing the internal/web API endpoints rather than the standard api.anthropic.com Developer API.
It seems the stream parser in cc-wiretap is expecting the standard Developer API events (like message_stop and the usage block for tokens) to terminate the streaming status. Since the Web API format differs and likely doesn't send token usage, the proxy never registers the end of the stream for the dashboard UI.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions