Skip to content

tracking: Claude provider observer overflows context window — no bound on history size, zero memory saved on long sessions #2958

Description

@thedotmack

Root Cause

The Claude provider's SDKAgent accumulates every observation into a single ever-growing conversation with no sliding window, token cap, or message limit. When long sessions with large tool outputs exceed the model's context window, the SDK returns 'Prompt is too long', the session aborts, and zero observations are saved. The OpenRouter provider has a truncateHistory mechanism; SDKAgent never received equivalent protection. A related sub-issue is that base64 image blobs in tool payloads bloat the prompt further without being stripped.

Tracked Items

Issues

PRs

Resolution

This is the canonical tracking issue for this root cause. Individual issues and PRs listed above will be closed in favor of this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugtrackingCanonical issue consolidating duplicate bug reports by root cause

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions