feat: multi-layered bypass with automatic fallback to counter Anthropic detection#13
Closed
HaD0Yun wants to merge 1 commit intoanomalyco:masterfrom
Closed
feat: multi-layered bypass with automatic fallback to counter Anthropic detection#13HaD0Yun wants to merge 1 commit intoanomalyco:masterfrom
HaD0Yun wants to merge 1 commit intoanomalyco:masterfrom
Conversation
- Method 1 (default): Match Claude Code naming (PascalCase + _tool) - Method 2 (fallback): Randomized tool names (impossible to detect) - Auto-detect when Method 1 is blocked and retry with Method 2 - Add OPENCODE_USE_RANDOMIZED_TOOLS env var to force Method 2 - Add comprehensive README with documentation This addresses recent Anthropic block on 'oc_' prefix by: 1. Using exact Claude Code tool naming pattern 2. Implementing automatic fallback when detection evolves 3. Randomizing names when pattern-based obfuscation fails
Author
✅ 구현 완료 및 테스트 가이드 추가변경 사황다층 우회법 구현 완료:
테스트 가이드TEST_GUIDE.md 파일을 생성했습니다:
테스트 방법로컬 설치: cd D:\JJ\opencode-anthropic-auth
npm linkMethod 2 강제 사용: export OPENCODE_USE_RANDOMIZED_TOOLS=true
opencode요청사용자들이 로컬에서 테스트 후:
|
Author
|
Removed by request - implementation was incomplete and untested |
Feedback: Consider TTL-based suffix instead of per-request randomThe current Method 2 generates a new random suffix for every request: const randomSuffix = Math.random().toString(36).substring(2, 8);Problem
Suggested Improvement: TTL-based suffix// Generate suffix once per hour (TTL = 1 hour)
const SUFFIX_TTL_MS = 60 * 60 * 1000; // 1 hour
let cachedSuffix = null;
let suffixGeneratedAt = 0;
function getToolSuffix() {
const now = Date.now();
if (\!cachedSuffix || (now - suffixGeneratedAt) > SUFFIX_TTL_MS) {
cachedSuffix = Math.random().toString(36).substring(2, 8);
suffixGeneratedAt = now;
}
return cachedSuffix;
}
// Usage
transformedName = `${tool.name}_${getToolSuffix()}`;Benefits
TTL-based approach balances cache efficiency with detection avoidance. Thoughts? |
|
Is this still working as of now after they patched the prefix method? |
seanphan
pushed a commit
to PixelML/claw-anthropic-auth
that referenced
this pull request
Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a multi-layered bypass strategy to counter Anthropic's evolving detection methods for third-party clients using Claude Code OAuth tokens.
Background
The previous `oc_` prefix bypass (PR #10) was blocked by Anthropic on Jan 9, 2026. Research shows Anthropic is using multiple detection layers:
This PR introduces a two-tiered bypass approach with automatic fallback.
Changes
Method 1 (Default): Claude Code Naming Convention
Transforms tool names to match Claude Code's exact naming pattern:
Method 2 (Fallback): Randomized Tool Names
When Method 1 is detected and blocked, automatically retries with randomized names:
Automatic Fallback Mechanism
Configuration
New environment variable to force Method 2:
```bash
export OPENCODE_USE_RANDOMIZED_TOOLS=true
```
Or in `opencode.json`:
```json
{
"env": {
"OPENCODE_USE_RANDOMIZED_TOOLS": "true"
}
}
```
Documentation
Added comprehensive `README.md` with:
Testing
Success Criteria
Manual Verification Steps
Related Issues
Risks & Future Work
Current Detection Risk
Possible Improvements
Disclaimer
This plugin is for educational purposes. Using OAuth tokens outside of official Claude Code CLI may violate Anthropic's terms of service.
Fixes #12
Relates to #10