claude-code - 💡(How to fix) Fix I don't have a bug report to analyze. Please provide the bug report details so I can generate an appropriate GitHub issue title for Claude Code.

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

[{"error":"Error: Error during compaction: API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context\n at Oi_ (/$bunfs/root/src/entrypoints/cli.js:6761:1646)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-30T10:53:40.359Z"},{"error":"Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.6.custom.input_schema.type: Input should be 'object'"},"request_id":"req_011CbYnGxz17VdyKMcUUXVwM"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:63979)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-30T12:49:43.730Z"}]

Code Example

[{"error":"Error: Error during compaction: API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context\n    at Oi_ (/$bunfs/root/src/entrypoints/cli.js:6761:1646)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-30T10:53:40.359Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.6.custom.input_schema.type: Input should be 'object'\"},\"request_id\":\"req_011CbYnGxz17VdyKMcUUXVwM\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:63979)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-30T12:49:43.730Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description

Environment Info

  • Platform: linux
  • Terminal: vte-based
  • Version: 2.1.158
  • Feedback ID: 87ae89f7-028c-4f83-b70b-40b94103ccda

Errors

[{"error":"Error: Error during compaction: API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context\n    at Oi_ (/$bunfs/root/src/entrypoints/cli.js:6761:1646)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-30T10:53:40.359Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools.6.custom.input_schema.type: Input should be 'object'\"},\"request_id\":\"req_011CbYnGxz17VdyKMcUUXVwM\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:63979)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-30T12:49:43.730Z"}]

● Your GitHub token doesn't have permission to create issues in the anthropics/claude-code repository directly. However, I've prepared the issue content for you to submit manually. Here's the formatted issue you can copy and paste:

Title: [Bug] Tool input_schema validation fails during compaction

Body: Bug Description

During context compaction, Claude Code is sending a tool with an invalid input_schema.type that doesn't conform to the Anthropic API spec. The API rejects the request with a 400 error requiring the type to be 'object'.

Steps to Reproduce

  1. Use Claude Code with a session that triggers context compaction
  2. Wait for compaction to occur or trigger it manually
  3. Observe API validation error on tool definitions

Environment Info

  • Platform: linux
  • Terminal: vte-based
  • Version: 2.1.158
  • Feedback ID: 775d1721-e8df-4b32-8f00-45d1e1f1c3e0

Error Message

Error: 400 { "type": "error", "error": { "type": "invalid_request_error", "message": "tools.6.custom.input_schema.type: Input should be 'object'", "request_id": "req_011CbYnGxz17VdyKMcUUXVwM" } }

Stack Trace

at generate (/bunfs/root/src/entrypoints/cli.js:11:63979) at makeRequest (/bunfs/root/src/entrypoints/cli.js:51:7694) at processTicksAndRejections (native:7:39)

Expected Behavior

Tool definitions should always include a valid input_schema.type set to 'object' before being sent to the Anthropic API.

Actual Behavior

At least one tool definition (tools.6) is being sent with an invalid or missing input_schema.type, causing a 400 validation error during API calls.

Additional Context

  • This occurs during the compaction phase when the context window needs to be summarized
  • The error blocks context compression and prevents further operations
  • This is a recurring issue affecting multiple users

To submit:

  1. Go to https://github.com/anthropics/claude-code/issues/new
  2. Paste the title and body above
  3. Add the bug label
  4. Click "Submit new issue"

Would you like me to help you with anything else regarding this bug report?

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix I don't have a bug report to analyze. Please provide the bug report details so I can generate an appropriate GitHub issue title for Claude Code.