claude-code - 💡(How to fix) Fix Authorized bounty/CTF security research blocked mid-session — need context-aware handling for whitehat workflows [3 comments, 3 participants]

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…
GitHub stats
anthropics/claude-code#48977Fetched 2026-04-17 08:54:14
View on GitHub
Comments
3
Participants
3
Timeline
10
Reactions
0
Timeline (top)
labeled ×4commented ×3cross-referenced ×3

Claude Code repeatedly blocks legitimate, authorized whitehat security research mid-session with API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy — killing long-running analysis sessions that are well within AUP's allowed dual-use security work (pentesting engagements, bug bounty programs, CTFs, security research).

The system prompt itself explicitly allows this:

"Assist with authorized security testing, defensive security, CTF challenges, and educational contexts... Dual-use security tools... require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases."

But in practice the filter fires on benign follow-ups after hours of context has been established, with no way to surface the authorization context to the filter.

Error Message

Claude Code repeatedly blocks legitimate, authorized whitehat security research mid-session with API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy — killing long-running analysis sessions that are well within AUP's allowed dual-use security work (pentesting engagements, bug bounty programs, CTFs, security research). Each attempt returned the Usage Policy error with a Cyber Verification Program link. Retrying with more clarification also blocked. Clearing context would lose hours of pipeline state (builds, harnesses, seed corpuses, git archaeology, etc.).

Root Cause

Claude Code repeatedly blocks legitimate, authorized whitehat security research mid-session with API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy — killing long-running analysis sessions that are well within AUP's allowed dual-use security work (pentesting engagements, bug bounty programs, CTFs, security research).

The system prompt itself explicitly allows this:

"Assist with authorized security testing, defensive security, CTF challenges, and educational contexts... Dual-use security tools... require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases."

But in practice the filter fires on benign follow-ups after hours of context has been established, with no way to surface the authorization context to the filter.

Fix Action

Fix / Workaround

  • Breaks long-running sessions for authorized security work. Context is the entire value of Claude Code for this use case — losing it forces restart from scratch.
  • Inconsistent: the session previously discussed libFuzzer harnesses, ASan instrumentation, CVE archaeology, git log -S body_sz, specific vulnerable parameter names, patch diff analysis, and reintroducing-fix-inverse differential testing — all fine. The block fired on literally "search the cve database first" which is less specific than what had already succeeded.
  • No escape hatch mid-session: no way to assert "this is authorized Immunefi work on Firedancer, program URL is X" and continue. The Cyber Verification Program is a form-based out-of-band process, not a live signal.
RAW_BUFFERClick to expand / collapse

Summary

Claude Code repeatedly blocks legitimate, authorized whitehat security research mid-session with API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy — killing long-running analysis sessions that are well within AUP's allowed dual-use security work (pentesting engagements, bug bounty programs, CTFs, security research).

The system prompt itself explicitly allows this:

"Assist with authorized security testing, defensive security, CTF challenges, and educational contexts... Dual-use security tools... require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases."

But in practice the filter fires on benign follow-ups after hours of context has been established, with no way to surface the authorization context to the filter.

Context when this happened

I was running an authorized Immunefi bug bounty engagement on Firedancer (Solana validator client, public bounty program at immunefi.com). Standard whitehat fuzzing methodology:

  1. Built libFuzzer + ASan harnesses against upstream OSS code
  2. Confirmed a v0.1 PoC no longer reproduces on master
  3. Wanted to do known-vulnerable differential testing — the exact practice Google's OSS-Fuzz documents and recommends: regress harness against historical fixes to validate the detector can see the bug class, before trusting any null result.

This is textbook defensive fuzzing engineering, not offensive work. The code is open-source. The program is an authorized public bounty. The target pays for this work.

What got blocked

After ~2 hours of successful session work, these benign follow-ups got hard-blocked:

  • "search the cve database first and check the source code on this first? is our tensored cve database rich enough"
  • "this is for study bounty hunting only"
  • "its from the bounty hunting site"

Each attempt returned the Usage Policy error with a Cyber Verification Program link. Retrying with more clarification also blocked. Clearing context would lose hours of pipeline state (builds, harnesses, seed corpuses, git archaeology, etc.).

Impact

  • Breaks long-running sessions for authorized security work. Context is the entire value of Claude Code for this use case — losing it forces restart from scratch.
  • Inconsistent: the session previously discussed libFuzzer harnesses, ASan instrumentation, CVE archaeology, git log -S body_sz, specific vulnerable parameter names, patch diff analysis, and reintroducing-fix-inverse differential testing — all fine. The block fired on literally "search the cve database first" which is less specific than what had already succeeded.
  • No escape hatch mid-session: no way to assert "this is authorized Immunefi work on Firedancer, program URL is X" and continue. The Cyber Verification Program is a form-based out-of-band process, not a live signal.

Requests

  1. Surface the auth context: allow a session-level declaration (via CLAUDE.md, a slash command, or a flag) that binds the work to a specific authorized program (Immunefi program URL, HackerOne scope, Guardian/Code4rena contest, CTF event), and have the filter factor that in.
  2. Raise the bar for mid-session blocks once a long coding/analysis context is established and has been flowing productively — a short benign follow-up shouldn't be able to trip a filter that earlier, deeper, more technical messages did not.
  3. Let the filter see the existing system prompt's allowlist. The system prompt explicitly authorizes "CTF challenges" and "bug bounty / pentesting engagement" contexts — the applied classifier seems to ignore that framing.
  4. Offer a graceful partial refusal: "I can continue methodology/engineering help, but not produce exploit code for target X" beats hard-killing the turn with no path forward.
  5. Document the Cyber Verification Program in-product with a link + ETA, so researchers know whether to wait or switch accounts.

Environment

  • Claude Code v2.1.110
  • Model: Opus 4.6 (1M context), also tried Sonnet 4.6 suggestion
  • Windows 11, bash shell
  • Authorized: Immunefi public bounty on firedancer-io/firedancer

Related

The in-session suggestion to switch to claude-sonnet-4-20250514 is unhelpful — it drops context to a ~200k window and doesn't address the policy classifier, which is model-independent.

Happy to share the session transcript privately if useful for triage.

extent analysis

TL;DR

The most likely fix is to implement a session-level declaration to bind the work to a specific authorized program, allowing the filter to factor in the authorization context.

Guidance

  • The filter seems to be overly aggressive in blocking benign follow-ups after a long-running session has been established, suggesting a need to adjust the filter's sensitivity or add a mechanism to surface the authorization context.
  • The system prompt's allowlist for "CTF challenges" and "bug bounty / pentesting engagement" contexts should be taken into account by the filter to prevent false positives.
  • A partial refusal mechanism could be implemented to allow the model to continue providing methodology/engineering help while avoiding exploit code generation for specific targets.
  • Documenting the Cyber Verification Program in-product with a link and ETA could help researchers understand the process and plan accordingly.

Example

No code snippet is provided as the issue is related to the model's filtering mechanism and authorization context, rather than a specific code implementation.

Notes

The issue is specific to the Claude Code model and its filtering mechanism, and the solution may require adjustments to the model's configuration or implementation. The provided guidance is based on the information given in the issue and may not be comprehensive or definitive.

Recommendation

Apply a workaround by providing a session-level declaration to bind the work to a specific authorized program, allowing the filter to factor in the authorization context. This could be achieved through a CLAUDE.md file, a slash command, or a flag, and would help to prevent false positives and allow the model to continue providing helpful responses.

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