Skip to content

199-biotechnologies/clademaxxing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

CladeMaxxing

Force maximum reasoning on every Claude Code API call -- including subagents.

Claude Code spawns subagents with thinking: null (reasoning completely disabled) while only the parent session gets full thinking: {"type": "adaptive"}. This means every time Claude delegates work to a subagent -- exploration, code review, planning -- that agent is running lobotomized.

CladeMaxxing is a local reverse proxy that intercepts all API calls and rewrites them to enforce full adaptive thinking and max effort on every request before it reaches Anthropic's servers.

The Problem

We discovered this by building a reverse proxy to intercept Claude Code's actual API calls to api.anthropic.com. Here's what we found:

Parent session call:

{
  "model": "claude-opus-4-6",
  "thinking": { "type": "adaptive" },
  "output_config": { "effort": "max" }
}

Subagent call (same session):

{
  "model": "claude-opus-4-6",
  "thinking": null,
  "output_config": { "effort": "max" }
}

The subagent gets the same model and effort level, but thinking is completely disabled. No extended reasoning. No chain-of-thought. This is the equivalent of asking Opus to solve problems without letting it think.

Additionally, we found that the effortLevel setting in settings.json defaults to "medium" and can be silently downgraded from "max" by the /model UI (anthropics/claude-code#30726).

How It Works

CladeMaxxing runs as a lightweight HTTP proxy on 127.0.0.1:9877:

Claude Code  -->  CladeMaxxing (localhost:9877)  -->  api.anthropic.com
                  ↓
                  Rewrites:
                  • thinking: null → {"type": "adaptive"}
                  • thinking: disabled → {"type": "adaptive"}  
                  • effort: anything → "max"

Every /v1/messages request is inspected. If thinking is missing, disabled, or using the deprecated budget_tokens, it's upgraded to adaptive. If effort isn't max, it's set to max. Everything else passes through untouched.

The rewrite parameters are verified against Anthropic's official API docs:

  • thinking.type: "adaptive" is the recommended mode for Opus 4.6 and Sonnet 4.6
  • output_config.effort: "max" is the highest available setting
  • budget_tokens is deprecated on 4.6 models in favor of adaptive thinking

Quick Start

# Clone
git clone https://github.com/199-biotechnologies/clademaxxing.git
cd clademaxxing

# Start the proxy
python3 clademaxxing.py start

# Wire it into Claude Code (adds ANTHROPIC_BASE_URL to settings.json)
python3 clademaxxing.py install

# Verify it's working
python3 clademaxxing.py test

That's it. All new Claude Code sessions will route through the proxy. Restart Claude Code to pick up the new settings.

Commands

Command Description
start Start the proxy (backgrounds by default)
start -f Start in foreground (see rewrite logs live)
stop Stop the proxy
status Check if running + settings wired
install Add ANTHROPIC_BASE_URL to ~/.claude/settings.json
uninstall Remove ANTHROPIC_BASE_URL from settings
test Send a test request to verify rewrites

What Gets Rewritten

Before After Why
thinking: null thinking: {"type": "adaptive"} Subagents have thinking disabled by default
thinking: {"type": "disabled"} thinking: {"type": "adaptive"} Re-enable reasoning
thinking: {"type": "enabled", "budget_tokens": N} thinking: {"type": "adaptive"} budget_tokens is deprecated on 4.6
effort: "low"/"medium"/"high" effort: "max" Enforce maximum capability
effort: (missing) effort: "max" API defaults to "high", we want max

Requirements

  • Python 3.8+ (no external dependencies)
  • Claude Code CLI
  • macOS, Linux, or WSL

How We Found This

  1. Noticed degraded reasoning quality in Claude Code sessions -- reactive instead of proactive, shallow solutions, excessive user prompting needed
  2. Found effortLevel: "medium" in settings.json -- a known bug silently downgrades max to medium/high via the /model UI
  3. Built a reverse proxy (ANTHROPIC_BASE_URL pointing to localhost) to intercept the raw API JSON
  4. Discovered subagent calls are sent with thinking: null while parent calls get thinking: {"type": "adaptive"}
  5. Confirmed via A/B testing that MAX_THINKING_TOKENS env var has no effect in Claude Code 2.1.x -- the only real controls are output_config.effort and thinking.type
  6. Verified parameter names and values against Anthropic's official documentation

Related Issues

License

MIT

About

Force maximum reasoning on all Claude Code API calls -- including subagents that run with thinking disabled

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages