Skip to content

Conversation

@Chesars
Copy link
Contributor

@Chesars Chesars commented Oct 20, 2025

Summary

Adds four new CLI flags to mini command 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 response

Details

Add 4 new CLI flags with proper type annotations in src/minisweagent/run/mini.py
Organize 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.3

Set command timeout and limit model response tokens
mini --timeout 120 --max-tokens 8000

Disable step limit completely
mini --step-limit 0

Complex 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

- Add --step-limit flag to limit agent steps
- Add --temperature flag for model temperature control (0.0-1.0)
- Add --timeout flag for command execution timeout in seconds
- Add --max-tokens flag to limit model response length
- Fix --timeout to apply to environment config (not agent)
- Add comprehensive tests for all new flags

All 28 CLI integration tests passing.
@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/minisweagent/run/mini.py 88.40% <100.00%> (+3.15%) ⬆️
tests/run/test_cli_integration.py 100.00% <100.00%> (ø)
tests/run/test_local.py 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant