Repository navigation
feat(agent): agent_options.thinking_effort overrides the spec effort (trait-settable) - #247
Open
collen-steffen wants to merge 1 commit into
Open
collen-steffen wants to merge 1 commit into
collen-steffen wants to merge 1 commit into
Conversation
…(trait-settable) thinking_effort could only come from the agent definition. A trait can contribute agent_options, but the runner ignored any effort there, so an agent that loads work-specific traits mid-session (packs) had one effort for everything it does. Measured on a Fortress agent (Claude Sonnet 5.5) drafting a loan agreement from a template: medium effort took 20.9-24.0 min over three runs. Low effort took 10.9, 13.1, 14.6 and 21.7 min over four runs (the 13.1-min run stopped early; the app now guards that case). The same agent also answers legal questions, where we want to keep medium. A trait-level effort lets the drafting trait run low without lowering the agent. - agent.new: agent_options.thinking_effort (0-100) wins over compiled_spec.thinking_effort. Out-of-range or non-numeric values are ignored. Precedence is unchanged otherwise: the agent's own agent_options win over a trait's (compiler merge order). - test: override applied and sent to the LLM; 0 turns it off; invalid values are ignored. - README: documented next to the other agent_options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139v7159kcEYoZk3JYhKwtK
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.
Problem
thinking_effortcomes only from the agent definition. A trait can contributeagent_options, and the compiler merges them, but the runner never reads an effort from there. An agent that loads work-specific traits mid-session therefore runs everything it does at one effort. Our Oracle does this: it loads packs such as template drafting, research and checklists as traits.Evidence
Fortress Oracle on DEV (Claude Sonnet 5.5), drafting a v1 loan agreement from a template against a term sheet; same probe on every run:
* stopped after 2 of 6 parts; the app now holds a run that leaves most sections untouched.
Low effort is a reasonable trade for drafting. We don't want it for the same agent's legal Q&A and research, so it should follow the trait.
Change
agent.new:agent_options.thinking_effort(0–100) takes precedence overcompiled_spec.thinking_effort. A value outside 0–100, or not a number, is ignored and the spec's effort stands.0turns thinking effort off.agent_optionsfirst and the agent's ownagent_optionson top, so an agent can still pin its effort.src/agent/test/agent_test.lua): the override is applied and sent to the LLM;0turns it off; out-of-range and non-numeric values are ignored.agent_options.Related: #246 (opt-in 1h prompt-cache TTL), from the same investigation.
🤖 Generated with Claude Code
https://claude.ai/code/session_0139v7159kcEYoZk3JYhKwtK