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.
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
truncateHistorymechanism; 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.