[Bug] Anthropic API Error: invalid_request_error when approaching context window limit
Resolved 💬 3 comments Opened Feb 17, 2026 by varunr89 Closed Feb 21, 2026
Bug Description
Hitting invalid_request_error when agent task nears context window
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.44
- Feedback ID: 6146cd21-f2e2-47a2-9528-a111c26f06e2
Errors
[{"error":"Error: Tool mcp__plugin_episodic-memory_episodic-memory__search not found\n at PRB (/$bunfs/root/claude:2105:7925)\n at v7 (/$bunfs/root/claude:682:20801)\n at F4 (/$bunfs/root/claude:682:39204)\n at np (/$bunfs/root/claude:682:49829)\n at cv (/$bunfs/root/claude:682:86106)\n at dTT (/$bunfs/root/claude:682:85078)\n at Al (/$bunfs/root/claude:682:84902)\n at tp (/$bunfs/root/claude:682:81320)\n at PR (/$bunfs/root/claude:682:6289)\n at W8A (/$bunfs/root/claude:675:14001)","timestamp":"2026-02-17T14:42:35.107Z"},{"error":"Error: Tool mcp__plugin_episodic-memory_episodic-memory__read not found\n at PRB (/$bunfs/root/claude:2105:7925)\n at v7 (/$bunfs/root/claude:682:20801)\n at F4 (/$bunfs/root/claude:682:39204)\n at np (/$bunfs/root/claude:682:49829)\n at cv (/$bunfs/root/claude:682:86106)\n at dTT (/$bunfs/root/claude:682:85078)\n at Al (/$bunfs/root/claude:682:84902)\n at tp (/$bunfs/root/claude:682:81320)\n at PR (/$bunfs/root/claude:682:6289)\n at W8A (/$bunfs/root/claude:675:14001)","timestamp":"2026-02-17T14:42:35.108Z"},{"error":"Error: Tool mcp__plugin_episodic-memory_episodic-memory__read not found\n at PRB (/$bunfs/root/claude:2105:7925)\n at v7 (/$bunfs/root/claude:682:20801)\n at F4 (/$bunfs/root/claude:682:39204)\n at np (/$bunfs/root/claude:682:49829)\n at cv (/$bunfs/root/claude:682:86106)\n at dTT (/$bunfs/root/claude:682:85078)\n at Al (/$bunfs/root/claude:682:84902)\n at tp (/$bunfs/root/claude:682:81320)\n at PR (/$bunfs/root/claude:682:6289)\n at W8A (/$bunfs/root/claude:675:14001)","timestamp":"2026-02-17T14:42:35.110Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.31.content.1: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.\"},\"request_id\":\"req_011CYDpPPjgwKHj4dUHYvRhx\"}\n at generate (/$bunfs/root/claude:327:8796)\n at makeRequest (/$bunfs/root/claude:366:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-17T14:42:44.308Z"},{"error":"Error: API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.31.content.1: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.\"},\"request_id\":\"req_011CYDpPPjgwKHj4dUHYvRhx\"}\n at bET (/$bunfs/root/claude:3159:795)\n at async hyB (/$bunfs/root/claude:3244:2545)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-17T14:42:44.310Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.31.content.1: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.\"},\"request_id\":\"req_011CYDpPUWS7WR6Les5xNFPj\"}\n at generate (/$bunfs/root/claude:327:8796)\n at makeRequest (/$bunfs/root/claude:366:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-17T14:42:45.711Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗