Context Overflow: Unable to Compact Due to Excessive Background Hook Context

Resolved 💬 3 comments Opened Jul 21, 2025 by jm7610 Closed Aug 19, 2025

Bug Description
I continue to run into Context low · Run /compact to compact & continue frequently. When I follow the instructions, I get a message that compact cannot be run because the context is too long. I think this might have to do with the fact that I have hooks running in the background, which, although not showing up in the output on screen, may be contributing to the context.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.56
  • Feedback ID: ee3c2f15-a210-49ad-b16f-3f7c987b35a9

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:924:11)\n    at execSync (node:child_process:996:15)\n    at A7 (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:797:5848)\n    at file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:709:48013\n    at Q (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n    at fY (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:709:45724)\n    at QK (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:709:44590)\n    at SB (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:709:50639)","timestamp":"2025-07-21T12:05:52.627Z"},{"error":"Error: ENOENT: no such file or directory, open '/proc/version'\n    at Module.readFileSync (node:fs:435:20)\n    at Object.readFileSync (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:615:7077)\n    at file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:615:8638\n    at Q (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n    at kT4 (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:709:62815)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-21T12:05:53.039Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 209994 tokens > 200000 maximum\"}}\n    at V4.generate (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1249:6428)\n    at dM.makeStatusError (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1266:2101)\n    at dM.makeRequest (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1266:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async w81.showErrors (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2670:14158)\n    at async w81 (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2210:1704)\n    at async mqB (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2670:14009)\n    at async file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2670:9066\n    at async JKA (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2670:1626)\n    at async ra (file:///Users/johnmerriman/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2670:9036)","timestamp":"2025-07-21T12:27:08.274Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗