Skip to content

fix(webui): Enter can't approve a permission prompt; countdown follows the backend - #4700

Merged
kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:kalin/agent-ui-permission-ux
Oct 5, 2026
Merged

kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:kalin/agent-ui-permission-ux

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

The Agent UI's Permission Request modal bound Enter to Allow. Someone typing in the composer when it popped up could approve a file write or a path grant just by finishing their sentence. Now the modal takes focus when it opens and Enter does nothing. Esc still denies, and Tab to a button then Enter/Space still works for keyboard users.

  • Countdown matches the backend. It counts to the deadline in the backend's timeout_seconds (10 minutes once fix(ui): permission prompts wait 10 minutes and denials name a real remedy #4699 lands) and shows 10:00. It no longer assumes 60 s when none is sent. Because it counts to a deadline instead of decrementing a counter, a throttled background tab can't drift out of step with the backend.
  • The path prompt describes a file as a file. "GAIA wants to use the file X" instead of "X (and anything inside it, including changes)". It uses the kind the agent sends after fix(ui): permission prompts wait 10 minutes and denials name a real remedy #4699 and falls back to neutral wording without it.
  • Error paths stay readable. Expanded tool steps showed error: Access denied: ' is not in allowed paths to copy/paste and page-text extraction. The path link swallowed the closing quote and rendered as an atomic box split out of the sentence. Quoted paths (spaces included) now link without their quotes, and the link renders inline.

Independent of #4699; either can merge first. #4509 replaces this modal with an inline card and should pick up the same rule. That card focuses Allow on mount, so Enter from the composer still approves there.

Test plan

  • cd src/gaia/apps/webui && npx tsc --noEmit && npm test && npm run build (69 files / 692 tests passed locally)
  • Trigger a permission prompt while typing in the composer and press Enter: the prompt stays open. Esc denies; Tab to Allow, then Enter approves
  • Expand a failed tool step whose error quotes a Windows path: the path shows as a link inside the sentence, quotes outside it

…s the backend

A permission prompt bound Enter to Allow, so a user typing in the composer
when it popped up could approve a file write or path grant by finishing their
sentence. Its countdown also assumed 60 s whenever the backend sent none, and
ticked down a counter that background-tab throttling lets drift.

- The prompt takes focus on open and Enter is unbound; Esc still denies, and
  Tab to a button then Enter/Space works as usual.
- The countdown runs to a fixed deadline from the backend's timeout_seconds,
  shows minutes (10:00), and shows nothing when the backend sent no timeout.
- The path prompt says "the file X" or "the folder X and everything in it"
  from the agent's kind, and neither when it is absent, instead of
  "(and anything inside it, including changes)" for a single file.
- Tool results keep a quoted Windows path inside its sentence: the link no
  longer swallows the closing quote, and it renders inline so copied or
  extracted text reads "denied: 'C:\...\file.txt' is not..." instead of
  splitting the path out.
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This closes a real hole. Pressing Enter in the composer while a permission prompt popped up could approve a file write or a path grant. Now the prompt takes focus and Enter does nothing, the countdown follows the backend's deadline, and quoted paths in error text link cleanly. The keyboard and countdown logic is correct and well tested.

One thing to settle before merge: until #4699 ships, the backend never says whether a path is a file or a folder, so every path prompt uses the new neutral wording. That wording drops the old warning that the grant covers everything inside the path, including changes. If this PR merges first, a user approving a folder is told less about what they're granting than they are today. Either keep the scope warning in the fallback wording or land #4699 first.

Real-world evidence

N/A: no evidence bundle was produced for this run. The verdict rests on static review plus the PR's unit tests. The PR shows no Agent UI screenshot of the prompt. Its two manual test-plan items (Enter while typing; a failed tool step quoting a Windows path) are still unchecked and need a Playwright before→after screenshot against gaia chat --ui, or the strix-halo lane.

🔍 Technical details

🟡 Path-grant prompt loses its scope disclosure when kind is absent (src/gaia/apps/webui/src/stores/notificationStore.ts:63)
Agent._confirm_path_access (src/gaia/agents/base/agent.py:2228) sends only {"path": ...} today, so pathAccessQuestion always takes the neutral branch: "GAIA wants to use C:\…\reports, which this chat cannot reach yet." A directory grant still covers its contents and allows writes. The backend's own summary (sse_translation.py:515) still says "and anything inside it, including changes". Keep that disclosure for the unknown case:

    : kind === 'file' ? `the file ${target}` : `${target} (and anything inside it, including changes)`;

Then update the "claims neither" test in notificationStore.pathAccess.test.ts. The PR says either PR can merge first; this is what makes that true.

🟢 Focus isn't returned to the composer when the prompt closes (PermissionPrompt.tsx:140)
The prompt takes focus on mount but never restores it. After Allow/Deny the user's next keystrokes go to <body> rather than the message they were typing. Save document.activeElement on mount and .focus() it in the effect cleanup.

🟢 Unquoted paths containing ' are now cut short (AgentActivity.tsx:355)
' was added to the unquoted branch's excluded characters, so C:\Users\O'Brien\notes.txt now links only C:\Users\O. The quoted branch also rejects any path containing a quote character. Consider excluding only the quote that opened the match, or leave ' out of the unquoted branch's excluded set.

🟢 Fractional timeout_seconds would render as 59.5s on first paint (PermissionPrompt.tsx:70)
The initial countdown state is the raw timeoutSeconds, not rounded. sse_translation already int()s it, so this is defensive only: Math.ceil(notification.timeoutSeconds!).

Strengths

  • A deadline-based countdown instead of decrementing a counter is the right fix for throttled background tabs, and the setSystemTime test proves it.
  • The keyboard tests cover what users actually hit: Enter fired at the composer, the window, and the focused element, plus a check that focus lands on the dialog and not on Allow.
  • Dropping the ?? 60 default stops the UI from inventing a deadline the backend never set, which matches the no-silent-fallback rule.

pathAccessQuestion dropped "and anything inside it, including changes"
whenever the backend didn't say file or folder, so a real folder grant
could read like a plain path with no scope disclosure. Restore the
warning for the unknown case; file and folder still get their own
specific wording when the agent sends kind.
kovtcharov-amd pushed a commit to kovtcharov/gaia that referenced this pull request Oct 4, 2026
…emedy (amd#4699)

An Agent UI permission prompt auto-denied after 60 seconds while the
TUI's equivalent waits 10 minutes, so looking away for a minute silently
refused the request. A path that was denied (or timed out) told the
model "start the agent with an allowed_paths list", which an Agent UI or
TUI user can't do. The model passed that on and told the user to move
their file into the server's working directory. Now the wait matches the
TUI, and the denial names what the user can actually do: ask again and
approve, or attach the file.

- **One wait everywhere.** `TOOL_CONFIRM_TIMEOUT_SECONDS` is 600, the
TUI's `DeliverableConfirmationTimeout`, and a test pins the two
together. Time spent on a pending prompt no longer counts against the
turn's 600 s stream budget, which one full wait would otherwise use up.
- **Remedies by host.** Hosts that can ask get "approve access when
prompted, or attach the file". Paths that no answer can grant get the
reason. Only hosts with nobody to ask (SDK/API) are still pointed at
`allowed_paths`. The `is not in allowed paths` prefix that classifiers
key on is unchanged.
- **"File" vs "folder".** The path prompt now says "the file X" instead
of "X (and anything inside it, including changes)". The grant itself is
unchanged: it goes into the single read/write allowlist. Writes still
prompt on their own because every write tool is confirmation-gated,
which the guide now says.
- **Failed tools look failed.** `tool_end` always reported `success:
true`, so a tool that returned an error showed a green check and a
"Result" label in the step details. It now repeats the outcome from its
`tool_result`.

Pairs with amd#4700 (Enter no longer approves, countdown follows this
timeout). The two PRs merge independently. amd#4509 sets the same 600 s on
its own per-session handler, so it doesn't conflict, but amd#4509's prompt
card still uses the old file/folder wording.

The denial text is model-facing. No agent eval was run with this change;
`gaia_files` and `gaia_honesty` are the categories to check before
merge.

## Test plan
- [ ] `python -m pytest tests/unit/test_security_access_prompt.py
tests/unit/agents/test_path_access_prompt.py tests/unit/chat/ui
tests/unit/test_stdio_permission_control.py
tests/unit/test_file_write_guardrails.py tests/unit/test_file_tools.py`
(1447 passed locally)
- [ ] `python util/lint.py --black --isort`
- [ ] In the Agent UI, ask GAIA to read a file outside the chat's scope
and deny it: the reply suggests approving or attaching, not
`allowed_paths`, and the failed step shows a red error icon
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 5, 2026
Merged via the queue into amd:main with commit 7a2bc39 Oct 5, 2026
@kovtcharov-amd
kovtcharov-amd deleted the kalin/agent-ui-permission-ux branch October 5, 2026 00:39
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 5, 2026
Brings in amd#4700. Its rules now apply to the inline permission card that
replaces the modal: the card takes focus instead of Allow, so Enter from
the composer can't approve; Esc denies, ahead of Esc-stops-the-reply;
the countdown runs to the backend's deadline and shows m:ss. amd#4700's
keyboard/countdown tests are ported to the card.
@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

documentation Documentation changes electron Electron app changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants