[Bug] Anthropic API Error: Content Filtering Blocks adding LICENSE

Resolved 💬 3 comments Opened Aug 28, 2025 by xtrasmal Closed Aug 31, 2025

Bug Description

API Error 400: Content filter when trying to add a licence file.
Due to the complexities of legal matters, I can imagine this being expected behaviour. In that case I would have appreciated a clear 400 response message.

Transcript:

 CLAUDE: Would you like me to add a specific license to your project?

> 1

 CLAUDE: ⏺ I'll add the Business Source License 1.1 to your project. This is a great choice as it provides commercial protection
  now while building community trust for future open source.
  ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering
     policy"},"request_id":null}

> what went wrong?

 CLAUDE:  ⏺ I haven't done anything yet! I was waiting for confirmation. Let me add the BSL 1.1 license to your project now.
  ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering
     policy"},"request_id":null}

> This is the error I see: "I haven't done anything yet! I was waiting for confirmation. Let me add the BSL 1.1 license to
  your project now.
    ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering
       policy"},"request_id":null}"

 CLAUDE:  ⏺ I see the issue - the content filter blocked my response, likely because license text can trigger false positives. Let
  me create the BSL 1.1 license file differently:
  ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering
     policy"},"request_id":null}

Environment Info

  • Platform: darwin
  • Terminal: zed
  • Version: 1.0.94
  • Feedback ID:

Errors

[{"error":"Error: {\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error AggregateError)\\n    at wVB._doRun (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:157829)\\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\\n    at async wVB._runOnce (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:157077)\",\"message\":\"PeriodicExportingMetricReader: metrics export failed (error AggregateError)\",\"name\":\"Error\"}\n    at LN0.error (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1978:4553)\n    at gC0.error (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:18356)\n    at file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:67232\n    at Object.Rm6 (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:67774)\n    at wVB._runOnce (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:157285)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-27T22:07:20.902Z"},{"error":"Error: {\"stack\":\"AggregateError [ECONNREFUSED]: \\n    at internalConnectMultiple (node:net:1134:18)\\n    at afterConnectMultiple (node:net:1715:7)\",\"errors\":\"Error: connect ECONNREFUSED ::1:4000,Error: connect ECONNREFUSED 127.0.0.1:4000,Error: connect ECONNREFUSED fe80::1:4000\",\"code\":\"ECONNREFUSED\",\"name\":\"AggregateError\"}\n    at LN0.error (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1978:4553)\n    at gC0.error (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:18356)\n    at file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:67232\n    at Object.Rm6 (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:67774)\n    at file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:556:14963\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-27T22:07:41.757Z"},{"error":"Error: {\"stack\":\"AggregateError [ECONNREFUSED]: \\n    at internalConnectMultiple (node:net:1134:18)\\n    at afterConnectMultiple (node:net:1715:7)\",\"errors\":\"Error: connect ECONNREFUSED ::1:4000,Error: connect ECONNREFUSED 127.0.0.1:4000,Error: connect ECONNREFUSED fe80::1:4000\",\"code\":\"ECONNREFUSED\",\"name\":\"AggregateError\"}\n    at LN0.error (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1978:4553)\n    at gC0.error (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:18356)\n    at file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:67232\n    at Object.Rm6 (file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:515:67774)\n    at file:///Users/derp/.config/claude/local/node_modules/@anthropic-ai/claude-code/cli.js:556:14963\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025

Note: Error logs were truncated.

View original on GitHub ↗

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