Repository navigation
feat(gaia): a browser, a smaller picker, and a fast path — the flagship's tool surface - #4407
Conversation
…on pages fetch_page is one HTTP GET, so anything behind a login was invisible to the agent — pointed at a logged-out feed it read back "Log in / Sign up", and the shipped price-watch / source-watch skills silently watched login screens. This adds a live Chromium the agent can open, read, click and type in, and a sign-in hand-off that saves the session for later runs. Text-first, not vision-first. The model is 80-95% of a browser task's wall clock (387 tok/s prefill => ~2.6s per 1,000 prompt tokens), so pages are described as a filtered list of interactive elements with stable refs — a few hundred tokens, and exact where a 4B model's predicted click coordinate is a guess. Measured on the fixture: first browser_open 0.80s, the browser_type after it 0.03s. Playwright's Python API is called directly in-process — no MCP hop, no subprocess. The driver is thread-confined because every tool body runs on a fresh daemon thread (Agent._call_tool_bounded) and Playwright objects are thread-affine; the browser is launched once and reused. Security: - GAIA never types a password. browser_login opens a visible window and waits for the user; password field values are stripped from every snapshot. - Acting inside a signed-in session is confirmation-gated. Reading the open web is not. The hook is CONFIRMATION_REQUIRED_TOOLS/_tool_requires_confirmation — gaia.governance has no production adopters. - Same SSRF screening as fetch_page, via WebClient.validate_url, so a page cannot steer the agent at a cloud metadata endpoint. Opt in to private addresses with GAIA_BROWSER_ALLOW_PRIVATE=1. - Sessions are AES-GCM on disk with the key in the keyring: a cookie jar is tens of KB and Windows Credential Manager caps entries near 1280 chars. Ciphertext is bound to its origin, so a moved blob fails to decrypt. Optional [browser] extra — the ~200 MB Chromium download is not core, and the mixin registers nothing when Playwright is absent. The six tools live in a lazy bundle so they cost no prompt tokens on turns that never browse. Co-Authored-By: Claude Opus 5 <[email protected]>
…er_open Two defects from self-review, both in how the confirmation gate learns where the browser is. A click can leave the site entirely, and only browser_open updated the tracked origin — so after following a link from an unauthenticated page onto a signed-in one, a click there would skip the gate. Every navigating action now records the origin it actually landed on. The origin was also read with origin_of() inside the success path, which raises on a URL that has no origin worth tracking (about:blank, a data URL). A perfectly good navigation was reported to the model as a failure. Tracking now clears the origin instead of raising — also the safe direction, since an unknown origin is never treated as authenticated. Also drops the always-on LIVE BROWSER prompt block. It cost ~90 tokens on every turn of the web/full profiles including the ones that never browse, which is the prompt tax the lazy bundle exists to avoid; the same guidance already lives in the tool docstrings, which are only sent when the bundle is loaded. Keeps the frozen ProfileSpec goldens (#2323) byte-identical on a default install. The unit fixture no longer patches pathlib.Path.home — a session-wide global — and patches the session module's own directory resolver instead. Co-Authored-By: Claude Opus 5 <[email protected]>
…ccess browser_login inferred "signed in" from no password field being visible plus any new cookie. Google and Microsoft — the two flows this feature most needs to survive — ask for an email address first and show no password field at all on step one, while analytics and session cookies keep arriving after the page settles. The check fired within seconds and saved a logged-out session, which then failed confusingly on the next run. Sign-in is now inferred from a transition rather than a state: a password field must have been seen and then gone, together with a navigation or a new cookie. Flows that never show one (passkey, a live SSO session) need both signals and a longer dwell, and nothing is concluded inside a 3s minimum — analytics cookies land in the first second on almost every login page. The regression test serves its fixture over loopback HTTP and sets one cookie on a delay. Both details are load-bearing and each was wrong in an earlier draft of the test: browsers refuse cookies on a file:// origin, and a cookie already present when the wait starts is in the baseline and can never look new. With either mistake the test passed against the very bug it guards. Verified red against the old heuristic, green against the new. Adds PlaywrightDriver.cookies() so the fixture's own assumption is asserted — if it stops setting a cookie, the guard would silently stop guarding. Co-Authored-By: Claude Opus 5 <[email protected]>
…left
Found driving the real TUI. Asking the agent to search Wikipedia took 6 tool
calls and 5 minutes: the search submitted correctly, but the snapshot came back
describing the page it had just left. The model saw its own action do nothing,
retried, and only got there by accident.
Two defects, one visible.
A click or Enter can start a navigation that has not committed when the call
returns. Snapshotting immediately captures the OLD document — the tool reports
the previous URL and hands back refs that are about to stop existing. Probing
it directly raised "Execution context was destroyed, most likely because of a
navigation", which is the race saying its own name. Actions now wait for the
URL to change and the new document to load before snapshotting, bounded so an
action that navigates nowhere pays the poll window and no more (measured: a
submit is 1.6s end to end, a plain snapshot stays at 0.001s).
The same run also hit `Locator.press: Timeout 30000ms exceeded` on a field the
next attempt typed into fine — press re-runs the full actionability check, and
the box had opened its autocomplete while the machine was busy running
inference. Enter is now sent with an explicit focus() plus a keyboard press,
neither of which waits on actionability.
The focus() is load-bearing and was arrived at the hard way: leaning on fill()'s
focus and pressing at page level submitted nothing on Wikipedia, because the
autocomplete re-renders the widget between the two calls. That intermediate
version passed the existing suite while silently breaking every search box,
which is what the new regression test now catches — verified red against the
old settle ("still on /search.html"), green against the fix.
Co-Authored-By: Claude Opus 5 <[email protected]>
…ument the TUI `gaia-tui`'s setup gate offers "press f to fix" when a model is missing. On a machine whose chat model already worked, the only missing piece was the ~300 MB EmbeddingGemma embedder — and the fix could not fix it. Lemonade wants opposite payloads for its two kinds of model, and the wrong one fails only on a cold cache, so both directions survive every warm-machine test. Built-in models are pulled by name alone; passing `recipe` makes Lemonade read the call as a new registration and 400 (#1655). A `user.`-prefixed model is the mirror image: it is not registered yet, so the first pull must carry checkpoint + recipe (+ embedding), and name alone returns HTTP 500 "not registered with Lemonade Server". `pull_model` sent name only for everything. `init_command.py` has had this right all along — the bug was that readiness had its own, simpler copy of the rule. The new tests assert the outgoing payload shape rather than mocking a 200, because a mock that answers without looking reports success for both spellings. Also adds the two TUI manuals and a skill pointing at them, written from driving the thing rather than reading the Go: - docs/guides/tui.mdx — user manual: the setup gate and what each row really gates on, choosing where inference runs, the permission prompt, troubleshooting. - docs/reference/tui-dev.mdx — developer manual: the three-process architecture, the control-API reference (keys takes an ARRAY), pty allocation, logs. - .claude/skills/gaia-tui-manual/ — points at both, and carries the five traps that each cost a debugging session, including the big one: the agent subprocess is spawned once and outlives your edits, so a before/after measurement taken without restarting the TUI is two measurements of the same build. Co-Authored-By: Claude Opus 5 <[email protected]>
…n review Three reviews (the PR bot, a code review and an architecture review) plus a token measurement turned up defects that all four of my own test suites passed over. The gate — the security control this feature rests on — was the worst of them. **Every page came back as 120 characters.** The page-text line reused the element-name helper, which ends in slice(0, MAX_NAME_CHARS), so the later slice(0, 4000) had nothing left to trim: 120 characters of a 63,000-character article. The whole reason to open a real browser is content fetch_page cannot see, and the model was getting the first sentence of it. Caught by measuring snapshot tokens, not by a test — every existing test read a title or a page shorter than the cap. **The gate missed every sibling origin of a live session.** Cookies belong to the browser context, so a login at accounts.google.com authenticates mail.google.com — but the check compared against the literal login origin, so "Delete forever" on the mail domain was ungated. It now asks the context which origins it holds cookies for, and fails closed if the browser cannot be asked. browser_open is gated inside a session too: an unsubscribe or delete link is a GET. **The gate only existed on ChatAgent.** browser_use is published in KNOWN_TOOLS and `gaia agent init --tools browser_use` scaffolds a plain Agent + mixin — which got a live, authenticated browser with no prompt at all. The MRO argument for putting it on ChatAgent was right; the conclusion was not. Agent now unions CONFIRMATION_HOOKS across the MRO, the mixin declares its own, and any agent composing it is gated by construction. **Navigation screening covered two tools of six.** A clicked link went anywhere unscreened, and its body came back as page text. The driver now routes every top-level navigation through the same check, and refuses to snapshot a page that landed somewhere disallowed. Server-side redirects are followed inside Playwright's network stack without re-entering the route handler, so the request is still made — the body no longer becomes context, and the docs now say exactly that rather than claiming more. Also: saved sessions are restored whenever the origin has one rather than only on the first browser call of a run (the common trajectory skipped it); a keyring or decrypt failure surfaces instead of silently continuing signed out; session errors name a file instead of a `gaia browser sessions` CLI that does not exist; the Agent UI releases the browser on cache eviction rather than holding up to ten Chromiums until the collector runs; and pull_model's new ValueError no longer escapes the provisioning stream. Docs: the duplicate Terminal UI guide is gone — its unique content (provider picker, permission prompt, troubleshooting, the embedder caveat) is folded into the existing guides/terminal-hub.mdx rather than shipping a second page with the same title. The plan doc now says what shipped instead of describing a sidecar and nine tools that did not. The "few hundred tokens" claim is replaced with measured numbers — 49 for a simple page, ~1,040 elements-only and ~2,000 with text for a dense one, which is a screenshot's ballpark, not an order below it. The argument that survives is grounding, not token count. The profilespec goldens now pin the extra off, so installing [browser] no longer turns a green suite red. Co-Authored-By: Claude Opus 5 <[email protected]>
…bles Three gaps the reviews left open, plus the one a real forecast page exposed. **Redirects are screened hop by hop.** The route guard only ever saw the first request — Playwright's network stack followed a 302 without re-entering it, so a public URL could still send one request to a private address. Navigations now resolve through route.fetch(max_redirects=0) in a loop, validating every Location before following it, the way WebClient already does per hop. **Popups are followed.** A target=_blank click or an OAuth popup opened a page the driver never looked at: the model saw "nothing happened" and retried, and the popup's origin never reached the confirmation gate. New pages are adopted as the described page. **Tables stay tables.** Snapshots flattened everything into prose, which destroys the row/column association numbers only mean anything inside — the place a model starts inventing values. On a mountain-forecast grid the whole forecast collapsed into a run-on string. fetch_page has had extract="tables" all along; a live browser should not be worse at the thing it was opened for. Capped at 3 tables x 30 rows x 12 columns: that page goes from 2,199 to 3,338 snapshot tokens, which is the right trade for data the answer depends on. Co-Authored-By: Claude Opus 5 <[email protected]>
…rving Playwright Four defects found by driving the real TUI against GLM-5p3, three of them only visible because a live model does things a fixture does not. **time.sleep() on the driver thread starved Playwright's own event loop.** The sync API pumps its loop on the calling thread, so sleeping there stops it dead — which is why a target=_blank click opened no page at all. Not "the popup was missed": the popup object was never created, and Playwright's own expect_popup on the same fixture proved the click was fine. The settle poll had the same bug and was quietly unreliable for the same reason. Both now wait through wait_for_timeout. **Popups are followed, and only the right one.** The context "page" event fires after the click has already returned, so the swap has to be synchronous. The first version adopted "the last page in the context" — which handed a popup left open by an EARLIER action to every later click. In the live run that clicked "Delete account permanently" and got back a report page opened two tests previously, reporting success against a page it had never navigated to. Adoption is now scoped to pages that appeared during this action. **A disabled control fails in 0.0s instead of 30.** Playwright waits for actionability, and a disabled button never becomes actionable, so the agent burned its whole budget to learn the button was greyed out. Asking is_enabled first turns that into an immediate, accurate message. Measured in the same live task: 56.2s -> 20.1s end to end. Each has a regression test built from the live failure: the popup test asserts the driver describes the tab that opened, the stale-popup test replays the delete-click sequence, and the disabled test caps the elapsed time rather than just checking the error text. Co-Authored-By: Claude Opus 5 <[email protected]>
Live-run regression. Deriving "signed in" from "the browser context holds a cookie for this origin" fixed the sibling-origin hole but broke the common case: almost every site sets a cookie, so the confirmation prompt fired on a public weather page during the test suite. A gate that interrupts normal browsing is a gate people learn to click through, which is worse than the hole it closed. The context is now consulted only once a sign-in has actually happened this run. That keeps what the cookie check was for — a login at accounts.google.com gating mail.google.com — without dragging in every unrelated site the agent happens to visit. Co-Authored-By: Claude Opus 5 <[email protected]>
…in state The live suite clicked "Send transfer now" with no prompt at all. That was correct by the old rule — the gate keyed purely on session state and the page had no session — and wrong by any other measure: a transfer is no more undoable on a site you happen not to be signed into. Gating is now on the control's own label as well as the session. The decision reads the accessible name the snapshot already captured, so it judges the specific element being clicked rather than the page it sits on. Precision was the whole design problem, because the failure that matters here is over-firing. "Submit", "Confirm", "Send", "Save" and "Order" are among the most common words on the web, and gating them would put a prompt in front of every search box and sort control — a gate that fires constantly is one people click through without reading, which is worse than not having it. The earlier cookie-based rule made exactly that mistake and interrupted a public weather page. So the list is phrases, matched on whole words: "Order by price" and "Reorder list" stay silent while "Place order" prompts. Verified against 20 ordinary control labels (zero prompts) and 13 irreversible ones (all prompt), and against the live fixtures: the transfer and delete pages gate, the service-request form and the cookie banner do not. The confirmation hook now receives the tool arguments. Without them a gate can only see "browser_click" and cannot tell a sort control from Delete account. Co-Authored-By: Claude Opus 5 <[email protected]>
…ly need Pre-flighting the advanced suite showed three tasks were unreachable, not just hard. A 200-row inventory has no item 150 in it: list items are not interactive so the snapshot returns zero elements, and the page text is capped at 4,000 characters, which stops around item 130. Scrolling would not have helped — nothing about the viewport was the problem. `browser_find` searches the live DOM and returns the surrounding context, reaching what the snapshot had to leave out for a few hundred tokens instead of the whole page. Dead ends and new tabs had no way out. `browser_back` goes back in history, and for a tab the driver adopted — which is not in the opener's history — it closes the tab and describes the page that opened it. Without that, a task that opens a detail tab can never return to the index it came from. They go in a second `browser_nav` bundle rather than growing `browser_use`: MAX_BUNDLE_MEMBERS is 6 and enforced, because one pull-in must not be able to exhaust the dynamic tool slots. Co-Authored-By: Claude Opus 5 <[email protected]>
An advanced task got stuck in a loop and returned nothing. The trace shows it clicking "e2" three times, bouncing between the shop index and one product page — because every page numbers its elements from e1, so e2 was "Back to shop" on one page and "Widget B" on the other. A ref held over from the previous page did not fail; it silently actuated a different control. Refs now carry the snapshot that issued them — g4e12 is element 12 of snapshot 4 — so a stale ref raises "not on the page any more", which the model already knows how to recover from by re-snapshotting. Silent misfires become honest errors. This is the failure mode the ref format existed to prevent in the first place; scoping was simply missing from it. Co-Authored-By: Claude Opus 5 <[email protected]>
The unit and integration suites passed while eight real defects sat in the main path. Worth writing down which ones, and what only a live model surfaced — otherwise the next person reads a green suite as evidence the thing works. Co-Authored-By: Claude Opus 5 <[email protected]>
…ng answers Six shapes that real sites use constantly, probed directly rather than through the model. Two were complete blind spots and three produced confidently wrong results, which is worse than failing. **Iframes were invisible.** A document-level query cannot see into one, so a support portal came back with zero elements and the agent reported there was nothing on the page. Frames are now snapshotted in their own context and merged, with the frame recorded in the ref (g4f2e7) so the click routes back to the right one. Payment fields and embedded widgets live here. **Shadow DOM was invisible**, for the same reason and with the same result: a device panel built as a web component had no controls at all. The collector now walks shadow roots. **Three identical "Select" buttons were indistinguishable.** Each element now carries its row's text, so the model can tell Account A from Account B instead of picking one at random. **A covered control timed out after 30 seconds with a generic message.** A cookie wall is the single most common reason a click will not land; the error now names what is on top — "covered by 'Close'" — which turns a dead end into an obvious next step. **A script-driven redirect returned the interstitial.** The model got a page reading "Redirecting…" and nothing else. Navigations now wait briefly for a setTimeout hop to fire. **A native confirm() was auto-dismissed with no trace.** Playwright dismisses dialogs when nothing is listening, so clicking "Archive record" reported KEPT and the model had no way to know why. Dismissing stays the default — accepting would take an irreversible choice on the user's behalf — but the dialog is now carried into the snapshot so the answer can say a confirmation appeared and was declined. Co-Authored-By: Claude Opus 5 <[email protected]>
A live run found the Reboot button on a web-component device panel and then reported there was no serial number on the page. The serial was printed directly beside that button, inside the same shadow root. Listing a component's controls while losing the content next to them is the worse half of the original blind spot: the page looks readable, so the answer comes back confident and wrong. Shadow roots do not contribute to body.innerText, so both the snapshot's page text and browser_find now walk them explicitly. Co-Authored-By: Claude Opus 5 <[email protected]>
Probing the driver directly found more in seconds than model-driven tasks found in minutes, and the table is worth keeping: two blind spots (iframe, shadow DOM) and three confident wrong answers (silent dialog, interstitial, covered click). Co-Authored-By: Claude Opus 5 <[email protected]>
# Conflicts: # src/gaia/agents/registry.py
The stub host borrows Agent's gate methods one by one, so the new confirmation_hooks dependency had to be borrowed too. Co-Authored-By: Claude Opus 5 <[email protected]>
… raising The ValueError handler sat on probe_model_present, which cannot raise one, while pull_model — which does, for a `user.` id no MODELS entry declares — caught only RequestException. provision_progress contracts to end in a ✗ line; instead the exception escaped the generator to the caller. Co-Authored-By: Claude Opus 5 <[email protected]>
…ithub.com/kovtcharov/gaia into claude/gaia-playwright-integration-33a074
Co-Authored-By: Claude Opus 5 <[email protected]>
The scorecard refresh ran the full eval 3x purely to compute a variance band. That cost 346 of the 384 minutes of the only FULL run that has ever completed (250 emails x 3 = 750 sequential classifications). The committed card shows what it bought: within-one-bucket stdev 0.0023 (cv 0.27%), and urgent_recall / personal_recall identical to the digit across all three runs. Dropping to one run is not a one-line change. At experiments=1 the harness records stdev 0.0 rather than omitting it, so the gate's k*stdev band collapses to zero and the comparison silently becomes a strict '<' -- stricter than before, tripping on sub-noise wobble. The band is now max(k*stdev, --regression-floor-pp) with a 1.5pp default floor, sized against the 1.16pp stdev this workflow's own comment cites from an earlier basis. Absolute bars are unchanged and still enforce independently of the band. Also adds a blocking LLM-coverage assert. EmailTriageAgent has a heuristic path that classifies without calling the model, and on that path llm_classified_count is absent from the scorecard rather than zero -- so a rules-only run produces a complete, green, meaningless card. A PR-profile run triaged 20 messages in 14s (0.7s/message) against the full profile's 27.7s/message, which is what prompted looking. The assert runs before the judge steps so a void run costs no judge spend. Re-derives the timeout budget against measured numbers (benchmark ceiling 620 -> 210 min) and restores the tool-timeout-fires-first ordering on both profiles. Corrects the "~10h" wall-clock figure repeated across four files: it was a padded budget ceiling, never a measurement. The committed card still records n_runs=3, so the basis guard will reject the new 250/1 default until one deliberate rebaseline=true dispatch re-cuts it. The guard's remediation text now leads with that path instead of steering back to experiments=3. Test file IO gains explicit utf-8: tests/unit/eval/test_scorecard_gate.py was unrunnable on Windows (cp1252 vs the scorecard's sigma), which hid 29 failures.
The step that proves the eval actually reached the model had no timeout-minutes in the PR-gate workflow, while the identical step in email_scorecard_refresh.yml caps at 10. An infra hang (unresponsive filesystem, missing eval-out) would have burned the scarce serial Lemonade slot until the 90-minute job cap killed it anonymously, instead of failing at a named step.
…probe Same stub gap as the binary-grant gate: the probe borrows Agent's methods one by one, so the new confirmation_hooks dependency had to come too. Co-Authored-By: Claude Opus 5 <[email protected]>
…e install importlib.find_spec imports the parent package to search it and RAISES when the parent is missing — it does not return None. installed() runs during tool registration on every agent build, so on any install without Playwright (every core install) agent construction died there. The existing test stubbed installed() itself, so it only ever proved the caller's branch; the new one drives the real function. Co-Authored-By: Claude Opus 5 <[email protected]>
FULL_OPTIONAL_TOOLS asserts every optional tool is registrable on a full install, and the browser tools register only when Playwright is importable — so the job validating that surface has to carry it. Applied to the release gate too, which the PR job is meant to predict. Co-Authored-By: Claude Opus 5 <[email protected]>
The manifest's 78 measured an install without the browser extra; the gate job now carries it, so the registered surface is 86. Co-Authored-By: Claude Opus 5 <[email protected]>
# Conflicts: # hub/agents/gaia/python/gaia-agent.yaml # hub/agents/gaia/python/gaia_agent/__init__.py
Picking an agent used to mean choosing between four overlapping options — the flagship plus three chat profiles it already supersedes. The three profiles are now hidden: absent from the Agent UI picker and the Hub browse listing, but still resolvable by id, so stored sessions, the *-lite aliases, and the eval scenarios keep working unchanged. The gaia-agent-chat package itself is untouched. GaiaAgent subclasses ChatAgent, so it remains a hard dependency of gaia-agent and a fully supported library — only its existence as a separate product goes. merge_with_registry now honours hidden in its registry-only pass, for the same reason GET /api/agents does. A published hidden agent still reads as installed in the catalog pass. release_agent_chat.yml published the chat wheel to the R2 Agent Hub catalog. It has never run (0 runs) and the catalog no longer lists chat, so it goes. The PyPI wheel lane (publish_agents.yml, driven by AGENT_WHEEL_PACKAGES in setup.py) is a different lane and is untouched — the flagship installs gaia-agent-chat from PyPI.
test_cli_setup_tools' _Gated borrows Agent's gate methods onto a non-Agent class rather than subclassing, so every collaborator _tool_requires_confirmation reaches for has to be copied across by hand. The browser tools added a per-call hook — CONFIRMATION_HOOKS / confirmation_hooks() — and the double did not carry it, so the two tests that assert a loaded skill can never pre-authorise install_cli or sign_in_cli died on AttributeError. The gate itself was never wrong. Asked directly, a real flagship agent still requires confirmation for install_cli, sign_in_cli, browser_login and write_file, and not for read_file, fetch_page or browser_open.
One conflict: main's #4376 added `_workspace_core_tools` at the same anchor where #4114 added `_profile_registers_tools`. Unrelated methods, both kept. Re-verified rather than assumed after the merge: the generator still derives 94 tools (CORE 16 + 24 bundles), fast prefill is still 2,860, and the default moved 17,652 -> 17,620, which the guide and CHANGELOG now say. main's 4a0a069 raised the tool-description budget to 500 chars, so the read_tool_output overage this branch inherited is gone — `util/lint.py --all` is now fully green.
Skill audit
✅ All audited skills cleared the tier they claim. Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the |
EvidenceRun on this branch at
The tool surface is 94, served liveThat is the whole G4 story in one response: Hidden, not deletedThe 422 is the clearest proof of the design: all six ids are still registered, while The browser really drives a browserReal Chromium, local HTML fixtures, no network. Includes the SSRF refusals Fast mode, measured
The confirmation gate, asked directly🔍 Unit-test differential against a real main baselineThe short version:
Both were run in their own worktree — Same nine files, same invocation, both trees:
🔍 Gates that pin the tool surfaceThe one failure and two errors are
Not covered here
|
…n it is there Three CI lanes, all genuinely this branch's. The picker re-point was too eager: it moved any stored selection the agent list did not contain, falling back to `agents[0]`. A list that simply has not finished discovering the flagship yet would drop the user on whatever agent happened to come first — App.newTask's welcome-screen test caught exactly that, landing a generic suggestion on the email agent. It now moves only TO the flagship, and only when the flagship is actually in the list. chatStore.prefs pinned `chat` as the blocked-storage fallback. That id is hidden from the picker now, so falling back to it would open on an agent the backend does not list. test_browser_use_live's allowed-navigation case shared the module-scoped driver with the two refusal tests. Refusing a navigation aborts it and parks Chrome on chrome-error://chromewebdata/, so the next goto raced the abort and lost on a loaded runner. It gets its own driver. Also two doc links written with a `/docs/` prefix, which is the rule for amd-gaia.ai URLs in src/gaia/, not for cross-references inside docs/. Verified: 646/646 vitest, 34/34 live-Chromium, 0 broken links of 2,556.
It came back `cancelled` at 30m19s with zero failing steps — the 30-minute wall, not a test failure. The suite measures ~22 min locally, so the margin was already thin and this branch's added tests crossed it. A budget a green suite can cross reads as a red lane to every reviewer who sees it.
# Conflicts: # .github/workflows/test_unit.yml # docs/guides/gaia.mdx # hub/agents/gaia/CAPABILITY_MATRIX.md # hub/agents/gaia/python/gaia-agent.yaml # hub/agents/gaia/python/gaia_agent/__init__.py # hub/agents/gaia/python/tests/test_capability_matrix.py
kovtcharov-amd
left a comment
There was a problem hiding this comment.
Reviewed the actual security surface (live browser tooling) and the merge-conflict resolutions the description calls out, since there are no other reviews on this PR yet.
Browser tooling is sound. browser_open/browser_click/browser_type route every navigation — including redirects and clicked links — through WebClient.validate_url (src/gaia/browser/session.py, browser_use_tools.py:_check_navigable), so the SSRF screening fetch_page already has (no private/loopback/link-local/metadata addresses) covers the live browser too, opt-out only via an explicit GAIA_BROWSER_ALLOW_PRIVATE=1. Sessions are AES-GCM encrypted with the key in the OS keyring and the origin bound in as AAD (src/gaia/browser/session.py), 0600 on disk, atomic writes. browser_login opens a real headed window so the model never sees the password. No subprocess/shell involvement in the browser layer.
Confirmation gating is deliberately conservative, not a rubber stamp. It fails closed (an error checking sign-in state requires confirmation, not skips it), and gates by browser context rather than URL match, so a login at an identity provider correctly gates its sibling origins.
The tool-count/picker/readiness merge conflicts documented in the PR body check out against the actual code — verified hidden is a display-only flag (still resolvable for old sessions, 422 only on a truly unknown id), FLAGSHIP_AGENT_ID has exactly one definition post-merge, and readiness.pull_model's ordering (cloud-model raise before the user.-prefix branch) plus provision_progress's widened RuntimeError catch match what's described.
🔍 What I found while re-resolving the conflicts against current main
The branch had drifted again — main independently landed a persistent shell-session feature (get_shell_state/reset_shell_session) after this branch's last sync, re-breaking the same 6 tool-count pins the PR describes fixing (86→94 became 88→96) plus a 7th spot (hub/agents/gaia/npm/SKILL.md's "Twelve of the agent's 94 tools" line, missed by the description's "six files" count).
More importantly, that same main-side change silently broke the fast-mode budget: get_shell_state/reset_shell_session register unconditionally in ChatAgent.register_shell_tools(), which the bare/fast profile already calls — so fast mode grew from 8 to 9 registered tools and the fixed prefill went from the documented 2,860 to 3,170 tokens, blowing past the FAST_PREFILL_CEILING = 3100 pin. Neither of these appeared in this PR's own diff (they auto-merge cleanly, no conflict markers) — a straight git merge origin/main followed by pytest is what surfaces them, not the diff review.
I re-derived the true tool count from capability_matrix.py (AST-based, not hand-arithmetic) rather than guessing: 96, CORE 16 + 25 bundles. I fixed all 7 pins, the fast-mode allowlist/ceiling, and the two doc numbers that quote the fast-mode token count (docs/guides/gaia.mdx, hub/agents/gaia/npm/CHANGELOG.md) to the re-measured 3,170, and confirmed hub/agents/gaia/python/tests/, hub/agents/chat/python/tests/ (580 tests) and the capability-matrix --check gate all pass on the result. This work is sitting locally, not pushed — happy to push if wanted, but given the PR's size I'm leaving that decision to a maintainer rather than pushing to a shared branch unasked.
One test (test_session_storage.py::test_truncated_session_is_loud_and_not_overwritten) fails on Windows for an unrelated, pre-existing reason (pytest.raises(match=str(path)) treats the Windows path's backslashes as a regex, at #4371) — not introduced by and not fixed by this PR.
Still open per the PR's own test plan: gaia eval agent has not been run against this branch (the author's evidence comment says so explicitly — no reachable Lemonade backend). This changes fast-mode's prompt surface and the tool schemas sent to the model, both LLM-affecting surfaces — worth having that run before merge rather than after.
Main independently landed the persistent shell session (get_shell_state/reset_shell_session) after this branch's last sync, which re-broke the tool-count pins this branch already carries a fix for (88 -> 96, not 94) and silently grew fast mode's registered surface and fixed prefill (3,100 -> 3,170 measured) since both tools register unconditionally in register_shell_tools(), which the bare profile already calls.
The eight live-browser tools shipped without a display label, so the Agent UI fell back to humanizing their raw names, and the committed UI schema still carried the old `chat` default for a session's agent type. Both were CI failures: `test_every_registered_tool_has_a_label` and `test_committed_schemas_match_the_backend_models`. Also re-measured the fast-mode prefill on the merged tree and corrected the number the guide, the changelog and the ceiling comment quote — 3,110 tokens against a 17,942-token default, where they said 3,170 / 17,620. The 3,300 ceiling and the 96-tool pins are unchanged; both re-derived clean from the code.
…l-surface # Conflicts: # docs/docs.json # hub/agents/gaia/python/gaia_agent/agent.py
`test_hidden_agents_are_not_listed` mocked the agent registry but not the on-disk hub installer, and `/api/agents` unions both (#2118). On any machine with a sidecar agent installed the assertion saw an extra id and failed for a reason that has nothing to do with the hidden filter it is testing.
|
Thanks — the drift you caught was real, and main moved twice more while this was being fixed. Everything you raised is now resolved on the branch; the only thing left open is the eval run, which CI physically cannot do until tomorrow morning. Your re-pin at What changed since your review
On the eval you asked for: it can't run. Every eval lane fails with an Anthropic quota exhaustion — the org is out of weekly budget until Sep 30, 8am PT, tracked as #4080. It's red on main for the same reason, five runs straight. Tomasz has said to proceed without it rather than hold the PR for a quota reset. 🔍 EvidenceEval lanes — quota, not a code failure. The browser-label failure. Gates re-run after the final merge:
Two lanes to ignore. Your Windows |
# 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]>
Three open PRs that change what the flagship agent offers a new user, folded into one
branch so the story can be tested end-to-end instead of a PR at a time. Separately,
each was unmergeable: the flagship's tool count is a single integer pinned in six
files, and all three moved around it while
mainmoved underneath them. Together theyanswer one question — what is a new user offered, and how fast does it answer —
with the browser reaching pages that were invisible, the picker no longer showing four
agents where one is the product, and a fast path so "hi" costs a fifth of a repo search.
Supersedes #3721, #4108 and #4114. Closes #4103.
What a reviewer should check
click and type, and sign in — the password goes to the human, never the model, and
the session is stored encrypted. Acting inside a session you signed in to asks
first. Optional
[browser]extra; without it none of the eight register.chat,docandfileare no longer selectable. Hidden, not deleted — everyid still resolves, so stored sessions,
*-litealiases and eval scenarios areunaffected, and
ChatAgentremains the flagship's base class.GAIA_FAST=1drops the flagship to a plain conversational surfacefor a whole session: 2,860 tokens of fixed prompt instead of 17,652, measured.
The number that forced the grouping
mainhad moved the tool count to 86 and #3721 was still moving 81 → 89. Neither isright: the merged registry is 94. It is set here in all six places that state it,
and
CAPABILITY_MATRIX.mdis regenerated from the code rather than hand-edited.🔍 Technical details — conflict resolutions and what was re-measured
Merge order
main→ #3721 (184 commits stale) → #4108 (76) → #4114 (73), one mergecommit each, so all three branches are ancestors and the member PRs show an empty diff.
Tool count. 94 = CORE 16 + 24 bundles, confirmed by executing
hub/agents/gaia/python/packaging/capability_matrix.pyagainst the merged tree, not byarithmetic. Pinned in
gaia-agent.yaml,gaia_agent/__init__.py,test_capability_matrix.py,CAPABILITY_MATRIX.md,npm/SKILL.mdanddocs/guides/gaia.mdx.readiness.pull_model— both sides were right and neither was complete.main'sis_cloud_modelearly raise now runs first (a gateway model must never reach payloadconstruction), then #3721's
user.-prefix checkpoint/recipe branch.provision_progressalso catches
RuntimeError, whichmain's guard raises and #3721's widenedexceptdid not cover — it would have escaped a generator that contracts to yield a failure line.
chatStore.ts— keptmain'sreadPref/writePrefhelpers and expressed #4108'stwo semantic changes through them. Also consolidated
FLAGSHIP_AGENT_ID:mainaddedutils/newTask.tsexporting it after #4108's base, so the naive merge left two exportedconstants that must change in lockstep.
Re-measured rather than merged. Fast mode registers 8 tools, not the 4 #4114
pinned — #3335 put the three
cli_setuptools inside ChatAgent's chat-profile earlyreturn.
FAST_PREFILL_CEILING2800 → 3100 (measured 2,860; the cli_setup schemas are497 of it). The pin is now a subset plus a size bound, because
search_documentation(needs
npx) andsearch_webregister conditionally and an exact list flaps betweenCI and a dev box.
Three CI lanes the PRs left asymmetric.
release_agent_gaia.ymlfroze the binarywithout the
browserextra while its test step claimed to use "the same extras" — areleased artifact would have registered 86 tools against a manifest claiming 94.
test_unit.yml's Windows lane andclaude.yml's auto-fix lane both run the fulltests/unit/suite but lackedplaywright.docs/guides/terminal-hub.mdx— dropped #3721's "Choosing where inference runs"section;
mainnow shipsguides/ai-providers.mdxcovering the same panel, so it wouldhave said it twice and frozen a second copy of the Lemonade-11.8.1 claim. Cross-reference
added instead.
Known scope boundaries, deliberately not fixed here:
chatwith a directChatAgentconstruction where the non-streaming path now goes through the registry
(
_chat_helpers.py), andagent_loop.py's autonomous tick keeps the same carve-out.Making them symmetric is a change to the UI's hot path that needs its own live-stream
evidence.
read_tool_outputis 69 chars over the tool-description budget. That docstring isbyte-identical to
origin/main's (same SHA) and main's lint lane is already red at6494a1cefor it. It is a description the model reads, so changing it is anLLM-affecting edit that needs its own eval run.
Test plan
pytest hub/agents/gaia/python/tests/ hub/agents/chat/python/tests/— the tool-countgates (94 / CORE 16 / 24 bundles), fast-mode pins, and
hidden=Trueregistrationpytest tests/unit— full unit suitepython hub/agents/gaia/python/packaging/capability_matrix.py --check— thegenerated matrix matches the code
python util/lint.py --allpytest tests/integration/test_browser_use_live.py— real Chromium, newly wiredinto the offline-integration lane rather than allowlisted out of CI
with no
agent_typelands ongaia; a historicalchatsession still reads"Chat" in the sidebar
GAIA_FAST=1answers a greeting, withquery_documents/index_codebase/list_inboxabsent from the surface