Skip to content

fix(agent): a declined action is not run another way - #4460

Merged
kovtcharov-amd merged 16 commits into
amd:mainfrom
kovtcharov:kalin/denied-effects-4447
Oct 5, 2026
Merged

kovtcharov-amd merged 16 commits into
amd:mainfrom
kovtcharov:kalin/denied-effects-4447

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

When you said no to a tool — or a prompt timed out with nobody there — the agent reached the same result through a different tool: decline pytest, and it wrote run_tests.py, ran it with execute_python_file, and told you it had. Now a "no" covers what the action does (running the tests, contacting a host, changing a file) for the rest of the request, whichever tool tries it next. The agent stops and asks with the exact command — "Allow once / Don't run it" in the TUI and Agent UI — or, where it cannot ask, says what is blocked and what it can do without it.

Closes #4447 (a slice of #4428).

🔍 Technical details
  • Ledger: denied_effects.py reads a call into effects — command family (every spelling of running the suite is one: pytest, python -m pytest, tox, unittest, pytest.main(), a run_tests.py/test_*.py script), network host, file path. Confirmation denials record everything; a shell policy refusal records only its host/path. Tool preflights ("read it first") record nothing — they are steps, not denials. Reset every turn.
  • Gate: _execute_tool checks it after the policy gate and before confirmation. "Allow once" runs that one call without a second prompt; the denial still stands for other routes.
  • Recovery prompt: after a denial or refusal it no longer says "create a NEW corrected plan that fixes the error".
  • Eval plumbing: the eval transport auto-approves every prompt, so nothing there could decline. An eval-only scripted user (GAIA_EVAL_SCRIPTED_USER=1, setup.decline_commands) declines named commands and answers nothing; insists_on_asking keeps a skill grant from running pytest past it. Set/cleared per scenario by the runner.
  • Noticed, not changed: the pytest binary policy's not-installed substitute tells the model to run the suite via execute_python_file. Right for a missing binary, but it is why the scenario needs pytest on the backend's PATH.
  • api.gen.ts was edited by hand (no Node locally) — npm run gen:api-types should produce no diff.

Test plan

  • pytest tests/unit/agents/test_denied_effects.py tests/unit/chat/ui/test_scripted_user.py — 62 pass (effect overlap, false-positive guards from review, gate order, allow-once, runner set/clear)
  • tests/unit — no new failures vs origin/main (the remaining failures fail identically there)
  • python util/lint.py --all — only the 2 pre-existing Windows-only pylint errors
  • Manual run on Gemma-4-E4B via the Agent UI backend with the scripted user: pytest declined → agent stopped, named cd ~/gaia-eval/resilience && python -m pytest test_totals.py, asked; no other route tried
  • gaia eval agent --category gaia_resilience (serial, one Lemonade)
  • gaia eval agent --category gaia_shell
  • gaia eval agent --category gaia_core
  • npm run gen:api-types in src/gaia/apps/webui — no diff

@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes mcp MCP integration changes eval Evaluation framework changes tests Test changes performance Performance-critical changes agents labels Sep 29, 2026
@kovtcharov
kovtcharov marked this pull request as ready for review September 29, 2026 16:29
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Tested on a combined build (this PR merged with #4457, #4459, #4461 and #4480) in the TUI as a new user, on DeepSeek V4.1 Flash. The agent now stops after a declined action instead of routing around it, which is the fix working. But the question it asks can't be answered on the TUI's default connection, so the turn hangs.

  • Declined write_file and then run_python for a test script. The agent stopped and asked "…I stopped instead of running it. Allow it once?" with [1] Allow once / [2] Don't run it.
  • Choosing [2] returned: ERROR — this agent connection cannot answer questions mid-run; relaunch the agent through the GAIA daemon transport. The turn stayed streaming until cancelled.
  • The question text also quotes the internally augmented request instead of the user's words: "My next step to finish “[GAIA Memory Context] Current time: 2026-09-29T09:21:18-0700 (Tuesday) In C:\…”", plus a raw write_file(file_path='C:\…') repr.

Suggested fix before merge: when the connection can't carry a mid-run question, end the turn with the question as the answer (the "stops and asks in its reply" path the CHANGELOG describes), rather than asking and hanging. Quote the user's original request, and describe the action in words ("write check_ties.py in a temp folder").

🔍 Technical details
  • Launch: gaia-drive (bare), then provider Fireworks. The chat view runs the agent over the subprocess transport, not the daemon.
  • The error string comes from the client's follow-up/answer path when the transport lacks mid-run answering; the agent side doesn't know that and keeps waiting.
  • The quoted request includes the memory-context preamble the loop prepends to the user turn; use the raw user message the turn started from.

@kovtcharov
kovtcharov force-pushed the kalin/denied-effects-4447 branch from 23f3813 to 28bdbc3 Compare September 29, 2026 17:06
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Fixed the hang reported above, and rebased onto main.

  • The connection now says whether it can return an answer. On the TUI's stdio connection it can't, so no question is shown. The agent stops and asks in its reply instead, as the CHANGELOG describes. The browser UI's connection can answer and keeps the Allow once / Don't run it picker.
  • The question quotes the user's own request, not the memory context the loop prepends.
  • New tests cover a console that can't take answers (never asked), a transport that can't answer (no question emitted, no wait), and the question text excluding the memory preamble. pytest tests/unit/agents/test_denied_effects.py tests/unit/chat/ui/test_scripted_user.py hub/agents/gaia/python/tests/test_stdio.py → 156 passed.

@kovtcharov-amd kovtcharov-amd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triaged this one carefully given the security angle — not merging, findings below.

The mechanism holds up. denied_effects.py reads a call into what it does (test-suite run, network host, file path, script) rather than what it's named, and Agent._check_denied_effects gates every call through the single choke point (_execute_tool) that the API server, MCP tool dispatch, and the memory-logging mixin all funnel through via the same method/MRO — so this isn't a shell-only patch that leaves run_python or an MCP tool as an open side door. I traced the extraction logic (AST-walking Python snippets, shell segment splitting, subcommand-depth scoping for git/gh/etc.) and it's deliberately conservative — cd, tail, pipe helpers are explicitly excluded so a denial doesn't over-block unrelated work. The 696-line test file backs this with real adversarial cases (denied host reached via urllib vs. curl, a script that doesn't exist yet, subcommand scoping for git push vs. git status).

Scope is honestly bounded, not silently incomplete. It's heuristic/pattern-based by construction, so an effect it doesn't recognize (some exotic MCP tool with fully opaque semantics) isn't covered — but the PR doesn't claim otherwise, and the in-scope surface (shell, python, network, file writes) is exactly what #4447's bug needed. Not a partial patch of one instance; a real generalization of "no means no" to the effect layer.

Interaction with context eviction: the DeniedEffects ledger lives on the Agent instance and resets at turn start (_process_query_impl), not in the message list that eviction trims — so eviction can't resurrect a stale denial or drop a live one. No bad interaction found.

Self-caught a real bug in dogfooding: the author's own TUI test found the question hanging on a transport that can't answer mid-run, and fixed it in a follow-up commit (answers_questions flag) rather than leaving it. Good sign.

Mergeability: GitHub's CONFLICTING status is stale — I did a local merge against current origin/main and got exactly one conflict, in docs/guides/eval-scenarios.mdx, where this PR's gaia_resilience table row collided with #4486's gaia_voice row added minutes earlier. Purely adjacent-line, no semantic conflict.

CI — one real failure, two unrelated flakes:

  • Test Gaia Agent (Linux) fails for a genuine reason: hub/agents/gaia/CAPABILITY_MATRIX.md is stale — this PR changes tool/confirmation behavior and adds a REST endpoint (/api/eval/scripted-user) but doesn't regenerate the matrix. Needs python hub/agents/gaia/python/packaging/capability_matrix.py before merge.
  • Unit Tests (Windows smoke) fails on a POSIX file-permission-bits assertion (test_atomic_concurrent_feedback_preserves_all_updates) — unrelated to this diff, a Windows/POSIX mode-bit mismatch.
  • Unit Tests (macOS smoke) fails on test_memory_turn_recall.py — unrelated memory-context test, not touched by this PR.
  • The Linux unit-test gate itself is green.

Recommendation: don't merge as-is — regenerate the capability matrix, then get a human security sign-off given the confirmation-gating nature of the change. The three checked-off manual/automated test-plan items give real confidence; the three unchecked gaia eval agent boxes (gaia_resilience, gaia_shell, gaia_core) should run before merge too, since this is exactly the kind of LLM-behavior change that unit tests can't fully validate.

@kovtcharov
kovtcharov force-pushed the kalin/denied-effects-4447 branch from 28bdbc3 to d1e32cb Compare September 29, 2026 20:33
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes. The core fix is sound, but the question-hang you fixed for the TUI can still happen on the hub's HTTP query endpoint, and the capability matrix is stale.

🟡 A caller that says it can't answer questions can still get stuck waiting. You fixed the TUI hang with a new "can this connection answer?" flag. The hub agent's /v1/gaia/query endpoint already has a flag for this, under a different name, and the new check doesn't look at it. Here is the sequence: a caller sends can_answer_questions: false, a shell policy refuses a host or file, and the agent then tries to reach it with another tool. The agent asks "Allow it once?" and waits out the full timeout (about 5 minutes by default) for an answer that can't arrive. Use one flag name for both, or check both names, and add a test for the HTTP route.

🟡 Test Gaia Agent will fail: the capability matrix is out of date. The new gaia_resilience category changes the generated capability matrix (16 → 17 categories). Regenerate it and commit the result.

The three gaia eval agent boxes in the test plan (gaia_resilience, gaia_shell, gaia_core) are still unchecked. This change affects how the model behaves after a "no", and unit tests can't show that, so run them before merge.

🔍 Technical details

Question-channel flag mismatch

  • hub/agents/gaia/python/gaia_agent/server.py:849-852 sets handler.can_answer_questions = False when the request says so.
  • _ask_to_lift_denial (src/gaia/agents/base/agent.py) only checks getattr(console, "answers_questions", True). SSEOutputHandler.request_user_input_blocking only short-circuits on self.answers_questions. On this path both read True.
  • The _stream() loop in server.py always continues on needs_input, so the worker blocks until confirm_timeout_seconds or 300. Confirmations on this path end the run instead, so the trigger is a _policy_refusal, which records NETWORK/PATH in the ledger, followed by a rerouted call.
  • Suggested fix: add handler.answers_questions = False next to the existing assignment in server.py, or pick one attribute name on SSEOutputHandler and use it everywhere. Add a test in hub/agents/gaia/python/tests/test_server_query.py to match the stdio one.

Capability matrix

  • python hub/agents/gaia/python/packaging/capability_matrix.py --check reports STALE. The regenerated diff is only the category count and the new gaia_resilience entry.

A denied, refused or unanswered tool call used to be routed around: after
`pytest` was declined the agent wrote run_tests.py and ran it with
execute_python_file, then reported the suite as run. A "no" now covers the
effect — the command family (every spelling of running the test suite is
one), the network host, or the file — for the rest of the request. A later
call that reaches it through any tool is stopped and put to the user with
the exact command (Allow once / Don't run it), or refused with an
instruction to ask when the surface cannot ask. The recovery prompt no
longer tells the model to "create a NEW corrected plan" after a denial.

Tool preflights ("read the file first") and fixable policy refusals are not
denials and do not block the retry; a shell policy refusal records only the
host or file it aimed at.

The eval transport auto-approves every prompt, so nothing could decline a
tool there. An eval-only scripted user (GAIA_EVAL_SCRIPTED_USER=1,
setup.decline_commands) declines named commands and answers no questions,
and the new gaia_resilience scenario fails if the suite runs after pytest
is declined.
In the TUI the flagship runs over stdio, which carries tool decisions but not
answers to free-form questions, so the "Allow it once?" question after a
declined action hung the turn. A transport now says whether it can return an
answer; on stdio no question is shown and the agent asks in its reply instead.
The question also quotes the user's own request rather than the memory context
the loop prepends to it.
@kovtcharov
kovtcharov force-pushed the kalin/denied-effects-4447 branch from d1e32cb to 671f684 Compare September 29, 2026 22:59
/v1/gaia/query with can_answer_questions=false set a handler attribute
nothing reads, so a rerouted call's "Allow it once?" still waited out the
full question timeout (~5 min) for an answer that could not arrive. It now
sets answers_questions, the flag the handler and the agent loop check; the
new route test hangs 300 s without it.

- Regenerate CAPABILITY_MATRIX.md and its category pin for gaia_resilience.
- test_scripted_user no longer enters the app lifespan, which left a
  process-wide agent registry behind and turned a later suite's
  agent_type "chat" into a 422 on CI.
The "Allow it once?" question showed a declined file write as write_file(file_path='C:\...') with the full temp path. It now reads "write check_ties.py in a temp folder", or names the folder when it is not a temp one.
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🟡 The new "Allow it once?" wording can hide the thing the user is being asked about. The latest commit shortens a declined file action to its verb and path, such as "download to Downloads in ~". It no longer shows the other arguments. Here is the sequence: the user declines a network host, and the agent retries with download_file. The user is then asked to approve "download to report.pdf" without seeing the URL, which is the part they declined. A "yes" also skips the normal confirmation, so they never see the full call. A move or rename has the same gap: the prompt drops the destination. Keep the short wording only when the path is the call's sole meaningful argument. Otherwise, append the remaining non-content arguments (URL, destination).

🔍 Technical details
  • src/gaia/agents/base/denied_effects.py:772-777: render_call returns on the first _PATH_ARG_NAMES hit for any tool matching _MUTATING_TOOL_RE. download_file(url=..., save_to=...) matches download + save_to, so url is dropped. move/rename tools keep only whichever of path/destination comes first in the tuple.
  • agent.py _check_denied_effects: the user's answer to this string returns allowed=True, which suppresses the regular confirmation. The string is the whole consent surface.
  • Suggested fix: render the friendly path, then add ", ".join(f"{k}={v!r}" ...) for the args other than the matched path key and content. Add a test asserting the URL appears for download_file and the destination appears for a move.

kovtcharov and others added 2 commits October 2, 2026 00:15
render_call shortened a declined file action to verb + path only,
dropping every other argument. download_file(url=..., save_to=...)
rendered as just "download to report.pdf" with the URL the user
actually declined nowhere in sight, and move/rename dropped whichever
of path/destination it didn't match first. Since a "yes" to this exact
string skips the normal full confirmation, that short string was the
entire consent surface.

Now the friendly wording is kept only when the path is the call's sole
meaningful argument; otherwise the remaining non-content args are
appended so the user sees what they're actually approving.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Fixed — the re-confirmation after a declined action now shows every argument that matters, not just the first path match.

  • render_call keeps the short "verb + path" wording only when the path is the call's sole meaningful argument.
  • Otherwise it appends the remaining non-content args, so download_file's re-prompt shows the URL and a move/rename's shows the destination — the thing the user actually declined is back in the consent surface.
  • Added test_render_call_keeps_the_other_args_a_user_declined covering download_file, move, and rename.
🔍 Technical details

src/gaia/agents/base/denied_effects.py — render_call no longer returns on the first _PATH_ARG_NAMES hit. It builds the friendly verb path string, then checks whether any other args (besides the matched path key and content) are present; if so it appends , ".join(f"{k}={v!r}" ...) for those, truncated at 300 chars like the generic fallback already does.

kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 4, 2026
amd#4693)

If you clicked **Deny** on a file write, the agent's honest reply ("I
can't write to your Documents folder, you denied the permission") was
replaced with "I can't confirm this is done … Treat it as unfinished —
ask me to pick it up". That message also named a path the user never
gave (`<cwd>\ui_notes.txt` for "ui_notes.txt in my Documents folder").
Worse, before replacing the reply, the completion check told the model
to write the file at that invented path. That raised a second permission
prompt the user hadn't asked for. Now a write the user turned down
counts as a finished answer once the reply says it wasn't saved. A false
"Saved!" is still caught and gets the real reason: "The write to
`…\Documents\ui_notes.txt` was declined, so nothing was saved there."

<details>
<summary>🔍 Technical details</summary>

- `CompletionEvidence` records write-tool calls that never ran because
they were refused: confirmation `status: "denied"`, or a validator
`Access denied:` / `User declined to overwrite` error. Preflight
refusals such as "read it first" are not recorded.
- The obligation is dropped only when a refused write matches it (same
key, inside the folder, or same bare name) **and** the answer admits it
wasn't saved **and** makes no save claim. Otherwise the gap is the
refusal reason. When every gap is a refusal, `incomplete_answer` returns
just those reasons, with no "complete the missing work" line.
- If the only gaps are refusals, the loop's `[check:completion]`
correction says not to retry the write anywhere. Before this change it
said "Use `write_file` for a missing requested save".
- A bare requested name is shown as the name in gap text, not as a
cwd-joined, case-folded key.
- Related: amd#4460 adds `DeniedEffects`, which keys denials on the path,
so a write of the same file elsewhere is not blocked. In this repro the
second write came from the completion correction above, not from the
model, so this PR removes that trigger. Widening `DeniedEffects` to
cover same-name writes belongs in amd#4460.
- Possible small conflict with amd#4508, which rewords `incomplete_answer`.
</details>

## Test plan
- [x] `python -m pytest tests/unit/agents/test_completion_evidence.py`:
the 9 new cases fail on `origin/main` (src diff reverse-applied) and
pass with the fix. The preflight guard case passes on both.
- [x] `python -m pytest tests/unit/agents`: 2112 pass. The 1 failure,
`test_symlinked_directory_is_the_same_output`, is an environment issue:
Windows `WinError 1314` (no symlink privilege). It is unrelated to this
change.
- [x] `python util/lint.py --black --isort`
- [ ] **Eval required (this changes the agent-loop answer gate):** `gaia
eval agent --category gaia_files`, and `gaia_honesty`, run serially on
one Lemonade
- [ ] Agent UI repro: ask "Create a file ui_notes.txt in my Documents
folder containing the line: hello from the agent ui", then click Deny.
Expect no second prompt, and the model's own "not saved" reply as the
final answer.
…efusal

A timed-out permission prompt is not a "no", so it no longer blocks other
routes to the same effect. The scripted eval decline now records its denial
through the console's own method instead of writing the stored format directly.
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 5, 2026
…md#4726)

If you asked a chat about a document it hadn't been given, the answer
never came. Indexing the file was refused without asking you. Reading it
did ask, but the tool gave up after 180 s while your answer was still
pending, so clicking "Allow once" afterwards did nothing. Even an
approved file stayed blocked for document search. Now indexing asks the
same question reading does, one approval covers reading, indexing and
querying for the rest of the chat, and waiting on your answer no longer
counts against the tool's time limit. Live on DeepSeek V4.1 Flash, the
original question ("which source tag do bootstrap-discovered items
get…", 47-page PDF) gets one prompt and a cited answer. Before the fix
it ran 43 steps and never answered.

<details>
<summary>🔍 Technical details</summary>

- `RAGToolsMixin._index_access_error` uses the agent's
`PathValidator.validate_read` (prompting) instead of
`_is_path_allowed(prompt_user=False)`.
- `RAGSDK(config, path_validator=...)`: ChatAgent passes its own
validator, so grants reach `_safe_open`. Before, text files failed
outright, and PDFs lost their content-keyed cache and were re-extracted
on every index.
- `_call_tool_bounded` excludes time spent on a prompt raised inside the
tool body, tracked through a contextvar clock in `_confirm_path_access`.
The prompt keeps its own 10-minute bound and cancellation.
- On an Agent UI cache hit, documents attached since the agent was built
are added to its validator.
- Model-visible text: `access_denied_message` gains "Do not copy, move
or convert it to another location to get around this." amd#4460 records
only confirmation denials and shell policy refusals, so it doesn't cover
a tool's own access-denied result.
- Agent UI eval runs set `GAIA_AUTO_APPROVE_TOOLS=1`. With that set,
path prompts are refused by design and never reach the scripted user, so
out-of-scope writes in `gaia_files` (e.g. `files_edit_file`) dead-end.
That's an eval-harness gap and isn't changed here.
</details>

## Test plan
- [x] `pytest tests/unit/test_path_access_grant.py`: 8 pass; 5 fail with
the src diff reversed
- [x] `tests/unit` plus the chat and gaia hub suites: 25 failures, all
identical with the src diff reversed; the rest are environment-only
- [x] `python util/lint.py --black --isort`
- [x] Live Agent UI backend, DeepSeek V4.1 Flash,
`GAIA_AGENT_TOOL_TIMEOUT=20`, prompt answered after 30 s: one prompt,
correct cited answer
- [ ] `gaia eval agent --category gaia_rag` and `--category gaia_files`
(tool results the model sees changed; run serially)

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🟡 The fix for "an unanswered prompt is not a refusal" never takes effect in the real app. The agent now asks the console whether the prompt timed out, but no real console can answer that question. Only the test's fake console can. In the Agent UI, a prompt that times out is therefore still recorded as a refusal, and every other route to the same action stays blocked. The new test passes only because its fake supplies the missing method.

Next step: add the timeout check to the Agent UI's console, set from its existing timeout branch. Then add a test that drives that real console through a timeout.

🔍 Technical details
  • src/gaia/agents/base/agent.py:5425 calls getattr(self.console, "confirmation_timed_out", None). Searching the repo finds that name only there and in tests/unit/agents/test_denied_effects.py:465 (_ExpiredPromptConsole). SSEOutputHandler, the base OutputHandler in console.py, and the hub stdio.py / server.py consoles don't define it. So callable(timed_out) is always False in production, and ledger.record(...) still runs on a timeout.
  • The timeout branch in SSEOutputHandler.confirm_tool_execution (sse_handler.py ~L1113–1127) already knows the prompt timed out, but it only sets _last_denial text. The simplest fix is to record a timed-out flag there and expose it through confirmation_timed_out(tool_name) on OutputHandler (default False), then override it in SSEOutputHandler.
  • The cancelled-before-answer branch (~L1100) is also "nobody said no". Decide whether it should get the same treatment.

kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 5, 2026
Same block as amd#4460 so the two merge cleanly in either order: a prompt
nobody answered carries the timed-out flag and is not written to the
declined-effects record when that record exists.
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Correct on this branch alone, and intended: the console side ships in #4461, which adds confirmation_timed_out to the Agent UI and stdio consoles and has the test that drives a real console through a timeout. Until #4461 lands, a timed-out prompt behaves here as it does on main (recorded as a refusal), so nothing regresses.

Merge #4461 with or right after this one; the two were written to merge in either order.

…4447

eval/ci_lanes.json keeps main's lanes: gaia_resilience is claimed once, by gaia-files, which also runs this branch's declined-test scenario.
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 5, 2026
Merged via the queue into amd:main with commit 067cc6e Oct 5, 2026
@kovtcharov-amd
kovtcharov-amd deleted the kalin/denied-effects-4447 branch October 5, 2026 21:13
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 5, 2026
Brings in amd#4460 (a declined action is not run another way). The API type artifacts are regenerated so both the scripted-user and select-model request models are present.
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 5, 2026
Brings in amd#4460. The agent loop now asks the console directly whether a prompt timed out, instead of the duck-typed lookup both PRs carried while either could merge first, so a timeout from the Agent UI or stdio console is never written to the declined-effects record. Tests drive both real consoles through a timeout and a decline.
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 5, 2026
…#4759)

The required Windows unit job times out on
`test_restaging_replaces_built_repositories`, which turns it red on PRs
that have nothing to do with it (amd#4460's run is the first; any PR
updated onto main since amd#4472 can hit it). Staging the eval fixtures
takes about 28 seconds on the Windows runner now that it builds the tier
repositories, and that test staged twice, landing on the 60-second
per-test limit; its neighbour passed at 55 seconds.

The file staged the whole environment six times. It now stages once for
the read-only checks and once more for a single re-staging test that
covers both read-only files and built repositories, so no test comes
near the limit and the file is about two minutes faster on Windows.

## Test plan
- [x] `pytest tests/unit/eval/test_stage_eval_env.py` passes (7 tests;
the POSIX-only fake-`gh` test still runs)
- [ ] `Unit Tests (Windows, py3.12)` passes on this PR without a timeout
in this file
@kovtcharov-amd kovtcharov-amd mentioned this pull request Oct 6, 2026
5 of 10 tasks
grtninja pushed a commit to grtninja/gaia that referenced this pull request Oct 6, 2026
# GAIA v0.25.0 Release Notes

## Breaking Changes

- **`gaia chat` runs the flagship GAIA agent**, the same agent as the
TUI and Agent UI, instead of the retired ChatAgent. `gaia chat -q "…"`
queries it once. (PR [amd#4520](amd#4520))
- **`gaia talk` transcribes and speaks through Lemonade** — it uses
Lemonade's Whisper and `kokoro-v1`, and stops with the reason if
Lemonade is down. The `[audio]` extra is gone; `pip install
amd-gaia[audio]` only warns. (PR
[amd#4665](amd#4665))
- **The Agent UI runs only the GAIA agent** — the Agent Hub home, agent
picker, and custom-agent export/import are removed from the UI. The CLI
and eval harness can still run other agents. (PR
[amd#4509](amd#4509))
- **The retired nomic embedder is removed** — memory saved with it is
re-embedded on first start. (PR
[amd#4489](amd#4489))
- **Indexed documents are re-indexed once** — the document cache is now
keyed on chunking settings, so the first query after upgrading rebuilds
it. (PR [amd#4624](amd#4624))
- **A skill that asks for more than its tier allows no longer loads** —
the permission ceiling is checked at every load, so a skill already on
disk that exceeds it is refused with the reason. (PR
[amd#4849](amd#4849))

## What's New

- **A larger local model where the GPU holds it** — `gaia init` picks
Qwen3.6-35B-A3B on a 64 GB+ Strix Halo or a 32 GB GPU and keeps
Gemma-4-E4B elsewhere, with each context window sized to available
memory. Qwen3.8 Flash Next is opt-in on 128 GB Strix Halo. (PRs
[amd#4479](amd#4479),
[amd#4670](amd#4670),
[amd#4671](amd#4671),
[amd#4658](amd#4658),
[amd#4655](amd#4655))
- **The Agent UI opens straight to a chat and sets itself up** — a fresh
install runs the same setup steps as the TUI in the window, with
provider, key and model settings, permission modes, and revocable
"always allow" grants. (PR
[amd#4509](amd#4509))
- **A much smaller install** — PyTorch, transformers and accelerate are
gone from the core, `[ui]` and `[talk]` installs; the desktop app's
Python environment drops from ~0.9 GB to ~0.1 GB on Windows. (PRs
[amd#4666](amd#4666),
[amd#4621](amd#4621),
[amd#4665](amd#4665))
- **One Windows installer for the desktop app and the terminal**, with a
GAIA Windows Terminal profile. (PRs
[amd#4720](amd#4720),
[amd#4707](amd#4707))
- **A "no" holds** — a declined action isn't retried through another
tool; the agent asks again with the exact command. The TUI gains
Shift+Tab permission modes. (PRs
[amd#4460](amd#4460),
[amd#4461](amd#4461))
- **Answers are checked against what the tools actually did** — the
agent looks at files you name before answering about them, and a short
plain-English note appears only when work isn't confirmed. (PRs
[amd#4532](amd#4532),
[amd#4501](amd#4501),
[amd#4508](amd#4508))
- **One shell session** — commands share a persistent shell, risky ones
ask instead of being refused, and "full access" is one setting
everywhere. (PR [amd#4408](amd#4408))
- **Memory surfaces what's relevant to each request, with its age**,
keeps what fixed a failure as a lesson for that workspace, and extracts
after the answer instead of before it. (PRs
[amd#4061](amd#4061),
[amd#4066](amd#4066),
[amd#4406](amd#4406))
- **`gaia.log` stays bounded** — it rotates at 10 MB with three backups
(`GAIA_LOG_MAX_MB`, `GAIA_LOG_BACKUPS`). (PRs
[amd#4668](amd#4668),
[amd#4760](amd#4760))
- **Child processes get a trimmed environment** — shell, MCP and skill
children no longer inherit GAIA's internal credentials; `GAIA_NO_DOTENV`
skips loading `.env`. (PRs
[amd#4635](amd#4635),
[amd#4659](amd#4659))
- **Every file tool checks the allowed-folders rule**, and paths inside
an inline shell script are checked one by one. (PRs
[amd#4656](amd#4656),
[amd#4758](amd#4758))

## Bug Fixes

A selection of the user-visible fixes; the full list is in the changelog
below.

- **Local Qwen models no longer loop on repeated tool calls** — they run
with their model card's sampling instead of near-greedy settings. (PR
[amd#4655](amd#4655))
- **Qwen3.6 runs on a Strix Halo with an older AMD driver** — it used to
crash on its first token, so `gaia init` failed; GAIA now turns off the
Vulkan path that crashes on those drivers only, and newer drivers keep
the faster path. (PR [amd#4674](amd#4674))
- **A long PDF no longer hangs or times out while indexing** — big
documents index in the background, and PDFs that only carry
owner-password restrictions now index. (PRs
[amd#4754](amd#4754),
[amd#4679](amd#4679),
[amd#4734](amd#4734))
- **Document answers cite the right document and page**, and every chunk
is embedded whole instead of its first 1,200 characters. (PRs
[amd#4688](amd#4688),
[amd#4723](amd#4723))
- **`gaia init` fails when model verification fails**, shows downloads
live, and no longer hangs while Lemonade hashes a large model. (PRs
[amd#4620](amd#4620),
[amd#4564](amd#4564),
[amd#4673](amd#4673))
- **`gaia init` adds a profile's extras without reinstalling GAIA**,
which failed on Windows while `gaia.exe` was running. (PR
[amd#4672](amd#4672))
- **Every SDK and CLI entry point starts GAIA's own Lemonade**, and
every call goes to the resolved URL with its API key. (PRs
[amd#4657](amd#4657),
[amd#4627](amd#4627))
- **Local chat stays cached across turns** — the system prompt is fixed
and side requests no longer evict the conversation. (PRs
[amd#4698](amd#4698),
[amd#4543](amd#4543))
- **A cloud model selection never preloads a local model**, and cloud
models no longer get llama.cpp-only fields. (PRs
[amd#4757](amd#4757),
[amd#4709](amd#4709))
- **The Agent UI stops claiming "100% local" while chat goes to a cloud
model**, and the chat header names the session's real model. (PRs
[amd#4711](amd#4711),
[amd#4550](amd#4550))
- **Enter can't approve a permission prompt**, and prompts wait 10
minutes before timing out. (PRs
[amd#4700](amd#4700),
[amd#4699](amd#4699))
- **Stopping a run keeps the turn and its steps visible.** (PR
[amd#4743](amd#4743))
- **A file edit keeps the file's line endings** — a one-line edit on
Windows used to rewrite every line ending, so a small change showed up
as the whole file changed. (PR
[amd#4864](amd#4864))
- **A broken agent install is reported as broken, not as missing** — the
error names both package versions and the real import error, and
suggests a reinstall that works. (PR
[amd#4588](amd#4588))
- **A meeting or document summary is never cut off mid-sentence** — a
thinking model used to spend the summary's output budget reasoning, so a
long meeting lost its second half. (PR
[amd#4827](amd#4827))
- **"What can you do?" gets an answer** instead of an attempt to
generate an image of the question. (PR
[amd#4809](amd#4809))
- **Writes and approved edits can't reach credential folders**
(`~/.ssh`, `~/.aws`, `~/.kube` and others), and shell option values and
script arguments get the same path check as plain paths. (PRs
[amd#4848](amd#4848),
[amd#4847](amd#4847))
- **`gaia connectors connect google --grant-agent installed:gaia`
works** — it used to fail with no sign-in link for the shipped agent; it
now asks for read-only Gmail and grants exactly that. (PR
[amd#4859](amd#4859))
- **A "no" to creating a folder also covers writing into it** — GAIA no
longer asks again to create the same folder a different way. (PR
[amd#4857](amd#4857))
- **`gaia skill import` runs the same checks as a hub install** — https
only, the audit, the permission ceiling, and an explicit opt-in for
skills that ship code. (PR
[amd#4849](amd#4849))
- **Memory off and private chats apply to scheduled and background runs
too.** (PRs [amd#4842](amd#4842),
[amd#4821](amd#4821))
- **Memory stops false apologies and reusing deleted values**, saves
"remember this" requests, and skips loading the embedder when memory is
off. (PRs [amd#4708](amd#4708),
[amd#4756](amd#4756))
- **A reply cut off by the token limit is continued** instead of ending
mid-sentence, and a tool call cut off at the output cap is retried
shorter. (PRs [amd#4054](amd#4054),
[amd#4556](amd#4556))
- **The TUI remembers the chosen model** across restarts and
agent-process restarts. (PRs
[amd#4497](amd#4497),
[amd#4710](amd#4710))
- **`gaia uninstall --purge` removes installer binaries, PATH edits and
daemon state.** (PR [amd#4413](amd#4413))

## Contributors

Thanks to the community members who contributed to this release:

- [@itomek](https://github.com/itomek) — the flagship's browser and tool
picker, one shell session, memory extraction off the answer path, stale
tool-result eviction, the TUI's sourced Fireworks rankings, and
`--purge` cleanup (PRs [amd#4407](amd#4407),
[amd#4408](amd#4408),
[amd#4406](amd#4406),
[amd#4465](amd#4465),
[amd#4414](amd#4414),
[amd#4413](amd#4413))
- [@mikemikimike](https://github.com/mikemikimike) — chained shell
command timeouts, bundled skills in frozen builds, and sidecar cleanup
reporting (PRs [amd#4463](amd#4463),
[amd#4467](amd#4467),
[amd#4419](amd#4419))
- [@Hashim1999164](https://github.com/Hashim1999164) — honoring
`GAIA_HOME` for cache, chat and index paths (PR
[amd#4381](amd#4381))
- [@krtadev](https://github.com/krtadev) — `~` expansion in file and
document tool paths (PR [amd#4576](amd#4576))
- [@aksh8b](https://github.com/aksh8b) — telling a broken agent install
apart from a missing one, with a reinstall hint that works (PR
[amd#4588](amd#4588))
- [@Dev-next-gen](https://github.com/Dev-next-gen) — numeric prerelease
ordering in the hub (PR [amd#4517](amd#4517))
- [@vianmangal](https://github.com/vianmangal) — recording denied tool
calls as unsuccessful in memory (PR
[amd#4412](amd#4412))
- [@GaetanVDB07](https://github.com/GaetanVDB07) — links to upstream
credential setup guides for connectors (PR
[amd#4669](amd#4669))
- [@rradjabi](https://github.com/rradjabi) — moving self-hosted CI jobs
to the xsj-dispatch runner pool (PR
[amd#4534](amd#4534))




## Also in this PR

- **Hub floors raised to core 0.25.0** — the chat agent imports the
allowed-folders check that only 0.25.0 ships (amd#4656), so
`gaia-agent-chat` goes to 0.2.0 with `amd-gaia>=0.25.0`, and the
flagship requires `amd-gaia>=0.25.0` and `gaia-agent-chat>=0.2.0`.
- **Two follow-ups held back until that floor could rise** —
`~/.gaia/logs/gaia-agent.log` now rotates like `gaia.log` (amd#4668), and
the chat agent's Python runners and Windows notification start their
children without GAIA's internal credentials (amd#4659).

The full changelog (300 commits) is in `docs/releases/v0.25.0.mdx`.

## Test plan

- [x] `util/validate_release_notes.py docs/releases/v0.25.0.mdx --tag
v0.25.0` passes; narrative is 590 words (cap 600)
- [x] `util/check_component_core_api.py --release-version 0.25.0` passes
- [x] `pytest tests/unit/test_docs_json_release.py
tests/unit/test_check_component_core_api.py
hub/agents/chat/python/tests/test_chat_dependency_floor.py
hub/agents/chat/python/tests/test_dependency_floor.py
hub/agents/gaia/python/tests/test_gen_binaries_lock.py` (72 passed)
- [x] `pytest hub/agents/gaia/python/tests/test_stdio.py` (91 passed,
incl. the new rotation test); `pytest
tests/unit/test_execute_python_file_cwd.py
tests/unit/test_run_python_tool.py` (42 passed)
- [ ] `mintlify validate` (docs CI job) — timed out locally, relying on
CI
- [x] Full flagship eval on main 9ce6598
(https://github.com/amd/gaia/actions/runs/37436249503): 181/308
scenarios pass vs 100/183 for the same categories in the baseline, 39
FAIL→PASS, 13 PASS→FAIL (two fixed in amd#4878, held until after rc1);
retrieval lane still finishing at merge time
- [ ] CI green

## Release checklist

- [ ] Publish `gaia-agent-chat` 0.2.0 only after core 0.25.0 is on PyPI
— it fails at import on an older core
- [ ] Build Installers on the merged SHA (pre-tag verification) before
pushing `v0.25.0`
- [ ] terminal-hub 0.25.0 published before the flagship npm release
consumes `binaries.lock.json`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents devops DevOps/infrastructure changes documentation Documentation changes eval Evaluation framework changes mcp MCP integration changes performance Performance-critical changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(agent): a denied tool is routed around through another tool instead of asking

2 participants