feat(opencode): add per-agent thinking toggle#27856
Open
salema97 wants to merge 2 commits into
Open
Conversation
Adds a new /yolo slash command in TUI sessions that toggles auto-approval
of all permission requests without prompting the user.
Changes:
- TUI session commands: new /yolo slash command in command palette
- KV store: persists yolo_mode state across sessions
- TUI footer: shows 'YOLO' indicator in warning color when active
- TUI sidebar: shows 'YOLO MODE' badge above the version footer
- TUI sync: auto-replies permissions when kv.get('yolo_mode') is true
Adds a field to agent configuration that allows overriding the model's default thinking/reasoning mode per agent. - — forces thinking on (uses model defaults) - — forces thinking off (strips all reasoning options) - — uses model default behavior This is useful for custom agents where you want deterministic, fast responses without reasoning overhead, or conversely where you want to ensure reasoning is enabled regardless of model defaults. Files changed: - config/agent.ts — added to schema and KNOWN_KEYS - agent/agent.ts — added to Info schema and merge logic - session/llm.ts — strips thinking options when agent.thinking=false
3 tasks
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.
Issue for this PR
Closes #
Type of change
What does this PR do?
Adds a
thinkingfield to agent configuration that allows overriding the model's default thinking/reasoning mode on a per-agent basis.thinking: true— forces thinking on (uses model defaults)thinking: false— forces thinking off (strips all reasoning options from the request)thinking: undefined— uses model default behaviorThis is useful for custom agents where you want deterministic, fast responses without reasoning overhead, or conversely where you want to ensure reasoning is enabled regardless of model defaults.
Changes:
thinkingto schema andKNOWN_KEYSthinkingtoInfoschema and merge logicagent.thinking === falseExample agent config:
How did you verify your code works?
thinkingfield is accepted in agent markdown frontmatterthinking: falsestrips reasoning options before the LLM callthinking: truepreserves model default reasoning behaviorthinkingleaves model defaults unchangedScreenshots / recordings
N/A — Backend logic change, no UI changes.
Checklist