Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions agent-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,20 +554,12 @@
"description": "Whether to track usage"
},
"thinking_budget": {
"description": "Controls reasoning effort/budget. Use 'none' or 0 to disable thinking. OpenAI: string levels ('minimal','low','medium','high'). Anthropic: integer token budget (1024-32768), 'adaptive' (lets the model decide), or effort levels ('low','medium','high','max') which use adaptive thinking with the given effort. Amazon Bedrock (Claude): integer token budget or effort levels ('low','medium','high') mapped to token budgets. Google Gemini 2.5: integer token budget (-1 for dynamic, 0 to disable, 24576 max). Google Gemini 3: string levels ('minimal' Flash only,'low','medium','high'). Thinking is only enabled when explicitly configured.",
"description": "Controls reasoning effort/budget. Use 'none' or 0 to disable thinking. OpenAI: string levels ('minimal','low','medium','high','xhigh'). Anthropic: integer token budget (1024-32768), 'adaptive' (adaptive thinking with high effort by default), 'adaptive/<effort>' where effort is low/medium/high/max (adaptive thinking with specified effort), or effort levels ('low','medium','high','max') which use adaptive thinking with the given effort. Amazon Bedrock (Claude): integer token budget or effort levels ('low','medium','high') mapped to token budgets. Google Gemini 2.5: integer token budget (-1 for dynamic, 0 to disable, 24576 max). Google Gemini 3: string levels ('minimal' Flash only,'low','medium','high'). Thinking is only enabled when explicitly configured.",
"oneOf": [
{
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"max",
"adaptive"
],
"description": "Reasoning effort level. 'adaptive'/'max' are Anthropic-specific. Use 'none' to disable thinking."
"pattern": "^(none|minimal|low|medium|high|xhigh|max|adaptive(/low|/medium|/high|/max)?)$",
"description": "Reasoning effort level. 'adaptive' uses adaptive thinking with high effort (default). 'adaptive/<effort>' specifies the effort level (low/medium/high/max). Use 'none' to disable thinking."
},
{
"type": "integer",
Expand All @@ -583,8 +575,13 @@
"low",
"medium",
"high",
"xhigh",
"max",
"adaptive",
"adaptive/low",
"adaptive/medium",
"adaptive/high",
"adaptive/max",
-1,
1024,
8192,
Expand Down
9 changes: 4 additions & 5 deletions cmd/root/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,10 @@ func (f *runExecFlags) createLocalRuntimeAndSession(ctx context.Context, loadRes
slog.Debug("Loaded existing session", "session_id", resolvedID, "session_ref", f.sessionID, "agent", f.agentName)
} else {
wd, _ := os.Getwd()
sess = session.New(f.buildSessionOpts(agent.MaxIterations(), agent.ThinkingConfigured(), wd)...)
sess = session.New(f.buildSessionOpts(agent.MaxIterations(), wd)...)
// Session is stored lazily on first UpdateSession call (when content is added)
// This avoids creating empty sessions in the database
slog.Debug("Using local runtime", "agent", f.agentName, "thinking", agent.ThinkingConfigured())
slog.Debug("Using local runtime", "agent", f.agentName)
}

return localRt, sess, nil
Expand Down Expand Up @@ -494,12 +494,11 @@ func (f *runExecFlags) buildAppOpts(args []string) ([]app.Opt, error) {
// buildSessionOpts returns the canonical set of session options derived from
// CLI flags and agent configuration. Both the initial session and spawned
// sessions use this method so their options never drift apart.
func (f *runExecFlags) buildSessionOpts(maxIterations int, thinking bool, workingDir string) []session.Opt {
func (f *runExecFlags) buildSessionOpts(maxIterations int, workingDir string) []session.Opt {
return []session.Opt{
session.WithMaxIterations(maxIterations),
session.WithToolsApproved(f.autoApprove),
session.WithHideToolResults(f.hideToolResults),
session.WithThinking(thinking),
session.WithWorkingDir(workingDir),
}
}
Expand Down Expand Up @@ -544,7 +543,7 @@ func (f *runExecFlags) createSessionSpawner(agentSource config.Source, sessStore
}

// Create a new session
newSess := session.New(f.buildSessionOpts(agent.MaxIterations(), agent.ThinkingConfigured(), workingDir)...)
newSess := session.New(f.buildSessionOpts(agent.MaxIterations(), workingDir)...)

// Create cleanup function
cleanup := func() {
Expand Down
7 changes: 0 additions & 7 deletions docs/configuration/models/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ Works for all providers:
thinking_budget: none # or 0
```

<div class="callout callout-info">
<div class="callout-title">ℹ️ Runtime Toggle
</div>
<p>Even when thinking is disabled in config, you can enable it during a session using the <code>/think</code> command in the TUI.</p>

</div>

## Interleaved Thinking

For Anthropic and Bedrock Claude models, interleaved thinking allows tool calls during model reasoning. This is enabled by default:
Expand Down
1 change: 0 additions & 1 deletion docs/features/api-server/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ All endpoints are under the `/api` prefix.
| `PATCH` | `/api/sessions/:id/permissions` | Update session permissions |
| `POST` | `/api/sessions/:id/resume` | Resume a paused session (after tool confirmation) |
| `POST` | `/api/sessions/:id/tools/toggle` | Toggle auto-approve (YOLO) mode |
| `POST` | `/api/sessions/:id/thinking/toggle` | Toggle thinking/reasoning mode |
| `POST` | `/api/sessions/:id/elicitation` | Respond to an MCP tool elicitation request |

### Agent Execution
Expand Down
1 change: 0 additions & 1 deletion docs/features/tui/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Type `/` during a session to see available commands, or press <kbd>Ctrl</kbd>+<k
| `/sessions` | Browse and load past sessions |
| `/model` | Change the model for the current agent |
| `/theme` | Change the color theme |
| `/think` | Toggle thinking/reasoning mode |
| `/yolo` | Toggle automatic tool call approval |
| `/title` | Set or regenerate session title |
| `/attach` | Attach a file to your message |
Expand Down
4 changes: 2 additions & 2 deletions e2e/debug_title_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ func TestDebug_Title(t *testing.T) {
{"OpenAI_gpt52pro", "openai/gpt-5.2-pro", "Assistant Capabilities Overview\n"},
{"OpenAI_gpt52codex", "openai/gpt-5.2-codex", "AI Assistant Capabilities\n"},

// Anthopic
// Anthropic
{"Anthropic", "anthropic/claude-haiku-4-5", "AI Assistant Capabilities Overview\n"},
{"Anthropic_Sonnet45", "anthropic/claude-sonnet-4-5", "What can you do?\n"},
{"Anthropic_Opus46", "anthropic/claude-opus-4-6", "AI Assistant Capabilities Overview\n"},

// Google
{"Google_Gemini25FlashLite", "google/gemini-2.5-flash-lite", "AI Capabilities Overview\n"},
{"Google_Gemini25FlashLite", "google/gemini-2.5-flash-lite", "AI capabilities overview\n"},
{"Google_Gemini3ProPreview", "google/gemini-3-pro-preview", "AI Capabilities Inquiry\n"},
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestExec_OpenAI_V3Config(t *testing.T) {
}

// TestExec_OpenAI_WithThinkingBudget tests that when thinking_budget is explicitly configured
// in the YAML, thinking is enabled by default (without needing /think command).
// in the YAML, thinking is enabled by default.
func TestExec_OpenAI_WithThinkingBudget(t *testing.T) {
out := runCLI(t, "run", "--exec", "testdata/basic_with_thinking.yaml", "What's 2+2?")

Expand Down
Loading
Loading