Repository navigation
feat(agent): run the flagship with no step limit by default - #5153
Draft
kovtcharov-amd wants to merge 1 commit into
Draft
kovtcharov-amd wants to merge 1 commit into
kovtcharov-amd wants to merge 1 commit into
Conversation
Long tasks stopped at 150 steps mid-work, so the flagship now has no step limit unless one is set with --max-steps, GAIA_AGENT_MAX_STEPS, or the new max_steps config key (0 means no limit everywhere a limit is taken). With no budget, a turn is bounded by the existing repeat and turn-scope guards, Stop, a new stall guard (30 steps in a row without a new successful call ends the turn with a summary; the model is nudged at 15), and on a hosted model a check-in every 200 steps through the confirmation prompt. Budget notices, the plan cap and the step-cap wording are off when there is no limit. Step events carry total: null and the Agent UI shows "Step N". The sidecar contract moves to 2.18 so /query accepts max_steps 0.
This was referenced Oct 16, 2026
3 of 4 tasks
kovtcharov-amd
pushed a commit
to kovtcharov/gaia
that referenced
this pull request
Nov 12, 2026
Long multi-part tasks ran into the flagship's 150-step limit and were cut off before their last part, with work already done and nothing left to finish it. The default is now 1000 steps: a backstop for a turn that never ends, not a budget that real work reaches. What still stops a turn early is unchanged: the repeated-call and repeated-failure guards, and Stop. The "wrap up now" notices count steps left (20, 10, 5), so they still arrive at the very end and not sooner. `--max-steps`, `GAIA_AGENT_MAX_STEPS` and a `/query` `max_steps` still choose a lower limit, and other agents keep 50. On a paid cloud model a stuck turn that slips past the guards can now run longer before it stops. Removing the limit entirely, with a periodic check-in on paid models, is the larger change drafted in amd#5153; this is the small step that can ship in the release. Refs amd#5153 Eval categories to watch on the next RC: the long-task lanes (`gaia_skills_tasks`, `real_world`). The limit appears in the step-budget notice text the model reads, so this counts as an LLM-affecting change; no eval was run locally. ## Test plan - [x] `python -m pytest tests/unit/agents/test_step_budget_adversarial.py tests/unit/agents/test_step_cap_final_answer.py tests/unit/agents/test_step_cap_usage.py tests/unit/agents/test_default_max_steps.py -q` - [x] `python -m pytest hub/agents/gaia/python/tests/test_gaia_agent.py -q -k "step_limit or wrap_up"` - [x] `python util/lint.py --black --isort --flake8` - [ ] In the app, a task that needs more than 150 steps runs to its end, and the step counter reads "of 1000"
kovtcharov-amd
added a commit
to kovtcharov/gaia
that referenced
this pull request
Nov 20, 2026
Before, a running turn printed raw tool calls with `args {…}` / `out
{…}` JSON, repeated the plan headline before every step, showed `Step
15/150`, and `--dev` piled more debug output onto the screen. After,
each step is one bullet that says what it did in plain words ("Read the
vendor's DPA in full", "Run a 42-line Python script that reads 3
spreadsheets"). One shimmering status line at the bottom shows what is
running now and for how long. A finished turn ends with the files it
made (size, sheets and rows, a clickable link) and a one-line recap.
Detail stays one key away with Ctrl+O, and the screen under `--dev` is
the same one every user sees.
Screenshots from the same contract-review task, run on `main` and on
this branch:
- **Before, running:** each tool call is followed by two lines of JSON,
a `✻` plan line, and `⣾ Step 7/150`.
- **After, running:** goal bullets ("Read the vendor's SLA and DPA in
full") with the file under each, then `⣟ Reasoning · 941 words… (2m
58s)`.
- **After, done:** the script write shows as a green-banded,
syntax-coloured diff. Below the answer, `Created contract_review.xlsx 7
KB · 1 sheet: Issues (13 rows)` and `✓ Read 6 files · ran 1 Python
script · 2m 48s · ↓ 7.7k tokens`.
<details>
<summary>🔍 Technical details</summary>
- **Where a headline comes from**, best first: a `description` argument
on the call, then the agent's announced goal (not stage lines, musing,
or template text), then a summary derived from the call. The agent-side
`description` parameter is a separate, eval-gated change; this PR only
reads it if present.
- **Motion** runs on the spinner's 20 fps tick and redraws only the
status line, a waiting prompt's title, and the recap line, which sweeps
once. It is off with `reduced_motion` (new `gaia config` key),
`GAIA_TUI_REDUCED_MOTION`, `NO_COLOR`, or a non-TTY.
- Measured: about 0.2 ms per frame with 400 messages on screen, and
about 2.3 % of one core during a live turn.
- **`--dev`** turns on the control API (`--debug` is still its alias)
and changes nothing on screen.
- Transport diagnostics go to `gaia-tui.log` under `--dev`, as on main.
- `--dev` or `--trace` puts an agent the TUI spawns at DEBUG logging.
- The per-turn metrics block and full stats moved behind Ctrl+O.
- **Failed steps follow main's retry rule** (amd#5151): `error` while the
turn runs, `error, retried` once a later run of the same file or command
succeeds, and a red `✗ failed` only if nothing recovered it.
- **Created block:**
- It lists only files changed during the turn.
- A path that is only named in text is looked at only under the start
folder or home, never on the network.
- Ctrl+F opens the newest file a turn made, and only documents that
cannot carry code. Ctrl+G keeps main's "reveal media in its folder".
- **Compatibility:**
- No step denominator is shown, with or without a limit (amd#5153).
- `continue_long_turn` renders as "Keep going? · 200 steps so far on
<model>".
- Fixes amd#5089 and amd#5122 on the TUI side.
</details>
## Test plan
- [ ] `cd tui && go vet ./... && go test ./...`
- [ ] Review the golden frames in
`tui/internal/ui/chat/testdata/frames/`: running, finished, diff,
recovered error, real failure, permission prompt, 40 columns, and
over-1-hour turns
- [ ] `cd tui && make build && ./bin/gaia-tui --dev`, then run a
multi-step task. Check that bullets lead with plain words, there is no
JSON, the status line shimmers, and the Created block plus recap appear
under the answer
- [ ] Press Ctrl+O on the finished turn and check that the commands,
timings and metrics are there
- [ ] `GAIA_TUI_REDUCED_MOTION=1 ./bin/gaia-tui` shows no shimmer and no
pulse
- [ ] With a permission prompt up, `/control/v1/screen?format=plain`
still shows `once`, `deny`, `n/esc` and the `›` composer line
- [ ] `python -m pytest tests/unit/test_cli_config.py`
This branch has not been deployed
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.
Held until after v0.25.0: this changes default behaviour, and only bug fixes go into the release. Keep it as a draft until then.
Long GAIA tasks stopped at "Step 150/150" mid-work, and from about half way the model was told to stop researching. The flagship now has no step limit by default. Several guards still stop a turn that isn't getting anywhere:
With no limit, the step-budget messages and the plan cap are off, and the Agent UI shows "Step N". To set a limit, use
--max-steps,GAIA_AGENT_MAX_STEPSorgaia config set max_steps <n>. A value of 0 means no limit.This changes LLM-facing prompt text and the agent loop, so it needs the flagship eval. The combined eval on main will cover it.
🔍 Technical details
total: nullwhen a turn has no limit. The TUI side is handled onfeat/tui-minimal-claude-style:oneshot.gostill printsStep %d/%d, and the check-in shows there as a genericcontinue_long_turnpermission prompt./querynow acceptsmax_steps: 0.Test plan
python -m pytest tests/unit/agents/test_unlimited_steps.py tests/unit/agents/test_step_budget_adversarial.py tests/unit/agents/test_default_max_steps.py hub/agents/gaia/python/tests -qcd src/gaia/apps/webui && npx vitest run src/stores/__tests__/notificationStore.stepCheckIn.test.tsgaia chat --max-steps 5 --query "..."still stops at 5 and shows the budget noticestests/fixtures/eval_baselines/gaia-flagship/