What is extended thinking

When you send a prompt to Autohand, the model can spend time reasoning through the problem before generating a response. Extended thinking lets you control how much of this internal reasoning happens. The three levels are:

LevelBehaviorBest for
ExtendedDeep chain-of-thought reasoning. The model explores multiple approaches, considers edge cases, and builds a thorough plan before responding.Complex problems that need careful analysis
NormalBalanced reasoning. The model thinks through the problem at a moderate depth before responding. This is the default.Everyday coding tasks and conversations
NoneDirect answers with no visible reasoning step. The model responds immediately.Simple lookups, quick questions, scripting

The thinking process happens as an internal step before the model produces its output. When you use extended thinking, you will see a brief pause while the model reasons, followed by a higher-quality response.

Activation

You can set the thinking level with a CLI flag, environment variable, or in your settings file.

CLI flag

# Deep reasoning for complex tasks
autohand --thinking extended

# Balanced reasoning (default)
autohand --thinking normal

# No reasoning, fastest responses
autohand --thinking none

Environment variable

# Set in your shell profile or CI environment
export AUTOHAND_THINKING_LEVEL=extended

Settings file

{
  "alwaysThinkingEnabled": true,
  "thinkingLevel": "extended"
}

Place this in ~/.autohand/settings.json for all projects or .autohand/settings.json in your project root for project-specific behavior.

Slash command

Toggle thinking level during an active session:

# Cycle through thinking levels
/thinking

# Or set directly
/thinking extended
/thinking normal
/thinking none

The status bar updates to reflect the current level:

[THINK: EXT] anthropic/claude-4-sonnet | 12,400 / 200,000 tokens

When to use each level

Extended thinking

Use extended thinking when the task requires deep analysis or when getting it right the first time matters more than speed. Good examples include:

  • Large refactors that touch many files and need a coherent strategy
  • Architecture decisions where the model needs to weigh trade-offs across your codebase
  • Debugging complex issues that involve multiple interacting systems
  • Writing algorithms with tricky edge cases or performance requirements
  • Security reviews where thorough analysis prevents missed vulnerabilities
  • Database schema design that needs to account for future migration paths

Normal thinking

Normal is the default and handles most day-to-day work well. It strikes a balance between response quality and speed:

  • Everyday code edits like adding a function, fixing a type error, or updating a config
  • File creation for components, tests, or configuration files
  • Code explanations when you want to understand how something works
  • Conversations about your codebase or technical decisions
  • Moderate refactors within a single file or small group of files

No thinking

Use none when speed is the priority and the task is straightforward:

  • Quick lookups like "what port does this server run on?"
  • Simple questions about syntax or API usage
  • Scripted workflows in pipe mode where latency matters
  • Batch processing where you run many small prompts in a loop
  • Status checks like "is the test suite passing?"

Cost and performance

Extended thinking uses more tokens because the model generates internal reasoning tokens before producing the visible response. This means higher cost and longer response times, but measurably better results for complex tasks.

LevelToken usageResponse timeQuality for complex tasks
Extended2-5x more tokens5-30 secondsHighest
NormalBaseline2-10 secondsGood
NoneFewest tokens1-3 secondsAdequate for simple tasks

The token budget for thinking can be configured with the MAX_THINKING_TOKENS environment variable. This sets an upper limit on how many tokens the model can spend on its reasoning process:

# Allow up to 10,000 tokens for reasoning
export MAX_THINKING_TOKENS=10000

# Or pass inline
MAX_THINKING_TOKENS=10000 autohand --thinking extended

Tip: Extended thinking does not always produce better results. For simple tasks like renaming a variable or fixing a typo, normal or none is faster and equally accurate. Save extended thinking for problems where the model genuinely needs to reason through multiple steps.

Combining with other modes

Extended thinking works well alongside other Autohand features to give you both depth of reasoning and structured control.

Extended thinking + Plan Mode

This is a powerful combination for architecture reviews and large changes. The model uses deep reasoning during the planning phase to produce a more thorough plan, then executes it after your approval:

# Start with extended thinking enabled
autohand --thinking extended

# Then activate plan mode
/plan

# Give your instruction
"Redesign the authentication system to support OAuth2 and SAML"

# The model reasons deeply about:
#   - Current auth implementation
#   - OAuth2 flow requirements
#   - SAML integration points
#   - Migration strategy for existing users
#   - Then presents a detailed plan

Extended thinking + Auto Mode

For complex autonomous tasks where the model works through many iterations, extended thinking helps it make better decisions at each step:

# Complex autonomous task with deep reasoning
autohand --thinking extended --auto-mode \
  "Migrate the database from MongoDB to PostgreSQL, update all queries, and fix the tests"

None thinking + Pipe Mode

For scripted workflows where you pipe data through Autohand, disabling thinking reduces latency:

# Fast batch processing
for f in src/**/*.ts; do
  cat "$f" | autohand --thinking none \
    -p "add JSDoc comments to exported functions" \
    --output "$f"
done

Practical examples

Debugging a race condition

Race conditions involve timing-dependent interactions across multiple code paths. Extended thinking gives the model time to trace through the concurrent execution paths:

autohand --thinking extended
"There's a race condition in the job queue. Workers sometimes
process the same job twice. Find the root cause and fix it."

Designing a database schema

Schema design requires reasoning about data relationships, query patterns, and future changes:

autohand --thinking extended
"Design the database schema for a multi-tenant SaaS billing system.
We need to support usage-based pricing, plan upgrades, and prorated charges."

Quick config lookup

For simple questions, skip the thinking overhead entirely:

autohand --thinking none -p "What version of React is this project using?"

Routine code generation

Normal thinking handles everyday code creation without delay:

autohand --thinking normal
"Create a new API endpoint at /api/users/:id/preferences
that returns user notification settings from the database."

Tips

  • Default to normal for most work. It provides good reasoning without the extra wait time.
  • Switch to extended when you notice the model making mistakes on a complex task, or when you are about to start a task that needs careful planning upfront.
  • Use none in pipelines where Autohand is called many times in a loop. The latency savings add up quickly across hundreds of calls.
  • Watch the token count in the status bar. Extended thinking consumes tokens from your context window, so you may hit compaction sooner in long sessions.
  • Combine thinking levels within a session. Start with extended thinking to plan a refactor, then switch to normal for the execution.

Tip: You can see the model's reasoning process by enabling showThinking in your settings. This displays the chain-of-thought output in the terminal, which is useful for understanding how the model arrives at its answer.

Frequently asked questions

What is extended thinking in Autohand?

Extended thinking controls how much reasoning the AI model performs before responding. Autohand supports three levels: none (fastest, skip reasoning), normal (default balance), and extended (deep reasoning for complex tasks). Extended thinking produces better results for architecture decisions and debugging but uses more tokens.

How do I enable extended thinking?

Use the --thinking flag when starting a session: autohand --thinking extended. Inside a running session, configure it through your settings. You can also set it as the default in your config file with alwaysThinkingEnabled: true. The agent shows its reasoning process when extended thinking is active.

When should I use extended thinking?

Use extended thinking for complex debugging, architecture design, multi-step refactors, and database schema decisions. Use normal thinking for everyday coding tasks. Use none for simple lookups and quick questions. Extended thinking costs more tokens but catches edge cases that normal mode might miss.