feat: Add CLI flags for mini: step-limit, temperature, timeout, and max-tokens #578
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.
Summary
Adds four new CLI flags to
minicommand for better control over agent execution and model behavior:--step-limit: Maximum number of steps the agent can take (set to 0 for no limit)--temperature: Model temperature control (0.0-1.0, lower is more deterministic)--timeout: Command execution timeout in seconds--max-tokens: Maximum tokens in model responseDetails
Add 4 new CLI flags with proper type annotations in
src/minisweagent/run/mini.pyOrganize config overrides into three clear sections: Agent, Environment, and Model
All flags properly override config file values when specified
Testing
✅ All 28 CLI integration tests passing
Usage Examples
Limit agent to 50 steps with lower temperature for more deterministic output
mini --step-limit 50 --temperature 0.3Set command timeout and limit model response tokens
mini --timeout 120 --max-tokens 8000Disable step limit completely
mini --step-limit 0Complex example: Run agent with full control over execution parameters
mini \ --model claude-sonnet-4-5-20250929 \ --step-limit 100 \ --temperature 0.2 \ --timeout 300 \ --max-tokens 8000 \ --cost-limit 5.0 \ --yolo \ --task "Refactor the authentication module to use OAuth2"Disable limits for unrestricted execution
mini --step-limit 0 --cost-limit 0