Skip to content

fix(agent): tell the flagship its own folders and the Agent UI's scheduler - #5564

Merged
kovtcharov-amd merged 6 commits into
amd:mainfrom
kovtcharov:kalin/agent-knows-its-folders
Oct 23, 2026
Merged

kovtcharov-amd merged 6 commits into
amd:mainfrom
kovtcharov:kalin/agent-knows-its-folders

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Before: asked to "summarize vendor_contract.md in my documents folder" (or "delete notes.txt in your documents folder"), the flagship took 8–11 tool calls. It tried ~/Documents, was refused the home folder, and only then found GAIA's own documents folder, which it could read all along. Asked to set up a recurring task in the Agent UI, it said it had no scheduler and sent the user to Windows Task Scheduler. After: GAIA looks in its own folders first, and in the Agent UI it points recurring requests at Scheduled tasks and helps word a valid schedule.

LLM-affecting. No eval hardware here. Watch these on the next RC: rag_quality, tool_selection, error_recovery, gaia_tool_selection.

Test plan

  • pytest tests/unit/chat tests/unit/agents hub/agents/chat/python/tests hub/agents/gaia/python/tests -n 4: 7119 passed. The 3 failures need Playwright, which isn't installed here, and fail the same way on main.
  • Prompt budget and golden tests fail exactly as they do on main (1 budget case plus 15 rows in test_profilespec_characterization.py). This PR adds no new failures.
  • python util/lint.py --black --isort
  • Agent UI with a tool-calling model: "summarize vendor_contract.md in my documents folder" reads ~/.gaia/documents on the first or second call
  • Agent UI: "every other Tuesday at 25:00, summarize sales_2026.csv" points to Scheduled tasks and proposes a schedule it accepts
  • Next RC eval: the four categories above

Evidence: Agent UI vs TUI session, no model

The real sidecar ran under uvicorn on a loopback port and built the real GaiaAgent for each session. Only process_query was replaced, so each turn reports the folders and scheduler lines from the agent's own system prompt. The Agent UI turn went through the UI's real relay (_dispatch_sidecar_query → relay_query → SidecarProxy) over HTTP, using the scope the UI computes for a chat with nothing attached. The TUI turn sent the body tui/internal/client/sse.go sends, which has no surface and no allowed_paths. Home and GAIA_HOME pointed at a temp folder.

GET /v1/gaia/version -> {'apiVersion': '2.19', 'version': '0.3.1', 'agent': 'gaia'}

=== Agent UI turn (real relay -> real HTTP -> real sidecar) ===
POST /v1/gaia/query fields: {'session_id': 'ui-chat', 'allowed_paths': ['C:\\Users\\Kalin\\AppData\\Local\\Temp\\gaia-evidence-lx97xhcu\\.gaia\\documents', 'C:\\Users\\Kalin\\AppData\\Local\\Temp\\gaia-evidence-lx97xhcu\\work'], 'surface': 'agent_ui'}
HTTP status: 200
System-prompt lines:
Your folders this session: C:\Users\Kalin\AppData\Local\Temp\gaia-evidence-lx97xhcu\.gaia\documents (GAIA's documents folder), C:\Users\Kalin\AppData\Local\Temp\gaia-evidence-lx97xhcu\work. For "my documents", "your folder", or a file named without a path, look here first.
Recurring tasks: the Agent UI runs a prompt on a schedule from **Scheduled tasks** in the sidebar (schedules like "every 6h", "daily at 9am", "every monday at 3pm"). For a recurring request, point the user there and help them word a valid schedule and prompt; never say scheduling is unavailable.

=== TUI turn (body as tui/internal/client/sse.go sends it) ===
POST /v1/gaia/query fields: {'session_id': 'tui-chat'}
HTTP status: 200
System-prompt lines:
Your folders this session: C:\Users\Kalin\AppData\Local\Temp\gaia-evidence-lx97xhcu. For "my documents", "your folder", or a file named without a path, look here first.

=== Unknown surface ===
HTTP status: 422

(Captured before main took 2.19 for #5553; this branch now reports 2.20.)

The TUI session gets the default scope, which is the home folder, so its line names that folder and has no scheduler line.

🔍 Technical details

Folders line. ChatAgent._get_system_prompt appends it on every profile except chat/fast (early_return). It lists the session's allowed_paths that are folders and exist, deduplicated, with GAIA's documents folder first and labelled. It is computed once per agent, so a folder created mid-session doesn't change the cached prefix. Attached files are left out because the indexed-documents line already names them.

Your folders this session: C:\Users\me\.gaia\documents (GAIA's documents folder), C:\work\proj. For "my documents", "your folder", or a file named without a path, look here first.

Its size is about 130 characters plus the paths, so around 180–240 characters (~60–75 tokens) in a typical UI session.

Scheduler line. This is 298 characters (~72 tokens) and appears only when config.surface == "agent_ui":

Recurring tasks: the Agent UI runs a prompt on a schedule from **Scheduled tasks** in the sidebar (schedules like "every 6h", "daily at 9am", "every monday at 3pm"). For a recurring request, point the user there and help them word a valid schedule and prompt; never say scheduling is unavailable.

Host signal. Nothing told the agent which front-end it serves. ui_session_id doesn't work for this because the TUI sends session_id too. This PR adds ChatAgentConfig.surface:

  • In-process UI chats (_session_agent_kwargs, which also covers warm-up) and autonomous ticks set it to "agent_ui".
  • Relayed chats send it as /query's new surface field ("agent_ui" | "tui" | "cli"). That makes the contract 2.20 (2.19 went to changes_turn_id in fix(ui): show a relayed agent's file changes in Outputs, Changes and Undo #5553), gated by min_surface_api_version, so older sidecars never get a field they would 422.

openapi.gaia.json, lifecycle.ts API_VERSION, SPEC, SKILL, README, CHANGELOG and docs/guides/gaia.mdx are updated together.

…duler

Asked to "summarize vendor_contract.md in my documents folder", the
flagship spent 8-11 tool calls trying ~/Documents and the home folder
before finding GAIA's documents folder, which it could read all along.
The system prompt now names the session's folders (existing, deduplicated,
GAIA's documents folder labelled) and says to look there first. The line is
computed once per session so the cached prefix stays stable, and the fast
chat profile, which has no file tools, gets none.

Asked to set up a recurring task in the Agent UI, it said it had no
scheduler and pointed at Windows Task Scheduler. Agent UI sessions now get
one line pointing at the Scheduled tasks page. Nothing told the agent which
front-end it serves, so ChatAgentConfig gains `surface`, set to "agent_ui"
by the in-process UI paths and sent by the relay as `/query`'s new
`surface` field (contract 2.19, only to sidecars that advertise it).
@github-actions github-actions Bot added documentation Documentation changes tests Test changes labels Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes (evidence only; the code looks ready)

This PR fixes two ways the flagship lost turns. It now tells the model which folders the session can use, with GAIA's own documents folder listed first. In the Agent UI it also tells the model that the sidebar has a Scheduled tasks page, so it stops saying it can't schedule anything. The new surface field is version-gated: older sidecars never receive a field they would reject, and every bundled doc moved to contract 2.19 together. I found no correctness problems.

The one thing missing is proof that it works on the surface users touch. Both Agent UI test-plan items are unchecked, and there's no captured /query request and response showing surface: "agent_ui" accepted. Add either one (a screenshot, or the raw request and response) and this is ready to merge. The eval categories to watch on the next RC are already named, which follows the LLM-change rule.

Real-world evidence

N/A. No evidence bundle was produced for this run. The verdict rests on static review and the PR's unit-test results. The Agent UI behaviour (the folder lookup and the scheduler pointer) and the real /query with surface were not exercised here.

🔍 Technical details

🟡 Missing real-world evidence

  • This is a user-visible Agent UI change, and the PR body has no screenshot. It also lacks the cheaper evidence: a POST /v1/gaia/query with "surface": "agent_ui" returning 200, and a /version call returning "2.19".
  • Either one is enough for merge-time CI. The screenshot can follow from the Strix Halo lane.

🟢 Nits

  • Agents without a ui_session_id, like the CLI and TUI, still get the folders line. That's probably intended, but it isn't documented anywhere. When allowed_paths is unset, the line falls back to Path.cwd() (hub/agents/chat/python/gaia_agent_chat/agent.py:454). So a sidecar the daemon started without a scope will tell the model "Your folders this session: ". The line is accurate, since that is the real scope, but the scope itself can be surprising. Worth one line in SPEC near allowed_paths.
  • Folders added later in a retained session are not shown in the prompt. This is a deliberate trade-off for prefix caching. Those folders arrive through validator.add_allowed_path (hub/agents/gaia/python/gaia_agent/server.py:1155), and the line is cached on first build. The model can still read the new folders; the prompt just doesn't name them. The docstring explains this, so no change is needed.

Checked and fine

  • surface passes safely through registry.create_agent: _accepted_init_params drops it for agents whose config doesn't have the field, so non-flagship in-process agents won't TypeError.
  • GaiaAgentConfig inherits from ChatAgentConfig, so the sidecar's build_query_agent and build_session_agent accept surface.
  • surface_supported follows the same rule as the other version floors: no version, no claim. Email's floor is None, so it never receives the field.

Strengths

  • The contract bump is done properly. openapi.gaia.json, lifecycle.ts, SPEC, SKILL, README, CHANGELOG and the docs guide all say 2.19, and the relay gates the field on the installed sidecar's version.
  • The tests cover the edges that matter: files, missing folders and duplicates are left out; the line stays stable mid-session; the fast chat profile is excluded; other front-ends don't get the scheduler line; an unknown surface gets a 422; and a 2.18 sidecar is never sent the field.
  • The prompt cost is small and stated up front: about 60–75 tokens for the folders line, plus a 72-token scheduler line only in the Agent UI.

The new prompt-context tests import gaia_agent_chat, which the plain
unit lane does not install, so that lane's wholesale-skip check failed.
They now run in test_chat_agent.yml and are allowlisted for the unit
lane. SPEC also says which folders the prompt names and when.
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label Oct 22, 2026
@kovtcharov

Copy link
Copy Markdown
Contributor Author

The evidence is now in the PR body. It shows a real Agent UI turn carrying surface: "agent_ui" through the real relay to a 2.19 sidecar, which answers 200, and the exact system-prompt lines for that session compared with a TUI session. The red Linux unit lane is fixed. It came from this PR's new test file being skipped in a lane without the chat wheel.

🔍 Technical details

Evidence (PR body, "Evidence" section). The real sidecar ran under uvicorn and built the real GaiaAgent; only process_query was replaced so the turn reports its own prompt lines. The Agent UI turn went through _dispatch_sidecar_query → relay_query → SidecarProxy over HTTP. The TUI turn used the body from tui/internal/client/sse.go. Result: /version is 2.19, the UI /query carries surface: "agent_ui" and returns 200, the UI prompt has the folders line (GAIA's documents folder first) plus the scheduler line, the TUI prompt has only the folders line, and an unknown surface gets 422.

CI root cause.

  • Linux: check_module_skips.py failed because tests/unit/chat/test_session_prompt_context.py has a module-level importorskip("gaia_agent_chat"), and test_unit.yml doesn't install that wheel. The file now runs in test_chat_agent.yml's chat-wheel step, is in that workflow's path filters, and is allowlisted under module_skips in util/test_lane_allowlist.yml. check_module_skips.py for the chat lane and check_test_lane_coverage.py both pass.
  • Windows: the only failure was test_file_watcher_settle.py::test_a_file_still_growing_without_events_is_not_reported_yet. That test races four 0.1 s sleeps against a 0.5 s debounce, and this PR doesn't touch the file watcher. It passes locally (15/15).

Nits.

  • Default scope: SPEC now says the prompt names the scope's existing folders once, when the session is built, with GAIA's documents folder first, and that later additions are usable but not named. It also says a caller that omits allowed_paths, like the TUI, gets the default scope named. For the flagship sidecar that default is the user's home folder (GaiaAgentConfig.allowed_paths), not the sidecar's cwd. The cwd fallback is only ChatAgent's.
  • Folders added mid-session: no change, as you noted.

Tests run.

  • tests/unit/chat -n 4: 2178 passed.
  • hub/agents/gaia/python/tests -n 4 with an isolated home and GAIA_MEMORY_DISABLED=1 (as CI runs it): 763 passed, 4 failed. All 4 fail identically on main here: 3 need Playwright browser tools, and 1 is the fast-mode prefill budget (3323 tokens on main).
  • hub/agents/gaia/npm: npm test, 151 passed.
  • Lint passes (black and isort).

Commit: 6fee703

kovtcharov-amd pushed a commit that referenced this pull request Oct 23, 2026
…5610)

Four timing-sensitive unit tests failed 8 unrelated PRs this week
(#5537, #5539, #5562, #5563, #5564, #5565, #5566, #5568) and one of
main's last 11 completed runs. Each still guards the same bug, but no
longer races the clock on a busy runner. Every rewritten test was
checked by breaking the code: it fails on the real bug and passes 50/50
runs, including under full CPU load. The PR also keeps three tests out
of the developer's real `~/.gaia`.

## Test plan
- [x] `pytest tests/unit/mcp/client/test_stdio_hung_server.py
tests/unit/test_file_lock.py tests/unit/test_mcp_bridge_concurrency.py
tests/unit/chat/ui/test_agent_model_override.py
tests/integration/test_folder_indexing.py -n 4`: 316 passed, 3 skipped
- [x] The four de-flaked tests, run 50x each: 250/250 serial, and
250/250 under xdist (32 workers) with all 32 cores also running busy
loops. Main's versions in that same loaded run: redaction failed 10/50.
- [x] Each test fails when its bug is put back in the code (see details)
- [x] `tests/integration/test_folder_indexing.py -n 4`, 5 runs: all
pass. Main's version fails 7 to 9 tests per run.
- [x] Test 841 passes with `GAIA_HOME` set to a temp dir. Main's version
fails.
- [x] Electron `npx jest`: 1098 passed. The one failure,
`test_electron_chat_installer.js` (component size 103,725 > 102,400),
also fails on main and is unrelated.
- [ ] CI green on Linux, macOS and Windows unit lanes

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

**`test_redaction_stays_fast_on_dense_escapes`** (Linux, 2.01 to 2.03 s
against a 2 s limit)
- Cause: an absolute 2 s bound. Locally the worst text takes 0.19 s. On
a 4-worker, coverage-traced runner it took about 10x that.
- Fix: time one 1M-char text against eight 125K texts with the same
total length, on the same machine. Linear code scores about 1.0 and a
quadratic scan scores 8, so the test asserts < 3. It takes the best of
up to three paired runs, and uses the lower of the wall-clock and CPU
(`thread_time`) ratios. Contention inflates wall time, and Windows
samples CPU time on ticks. The test also fails if the 1M text takes more
than 15 s of CPU, which catches a per-position rescan: that is linear
but takes minutes.
- Break checks: a quadratic prefix copy in `_candidate_windows`
(`len(text[:start].rstrip("\\"))`) gives a ratio of 5.9x and the test
fails. Main's 2 s test passed that same regression locally (1.57 s). A
per-anchor rescan without merging takes 56 s and hits the 15 s ceiling.

**`test_children_of_an_exited_server_are_still_stopped`** (Linux)
- Cause: the test slept a fixed 2 s for the child watcher. The watcher
backs off (0.5, 1, 2, 4 s…), so on a slow start its next scan came after
the launcher had exited and the child was never recorded.
- Fix: poll until `child_pid in transport._children`, with a deadline of
3 × `_CHILD_SCAN_MAX_S`.
- Break checks: never recording children fails with "never recorded".
Clearing `_children` before stopping fails with "kept running". Delaying
the watcher's first scan by 2.5 s reproduces the CI failure on main's
test, and the new test passes.
- Note for the product side: a launcher that spawns a child and exits
inside a backoff window still orphans that child. Real `npx`/`uvx`
launchers outlive the window.

**`test_the_next_waiter_takes_the_lock_within_milliseconds`** (macOS,
median 6.5 to 8.1 ms against 5 ms)
- Cause: macOS stretches `sleep(0.001)` under load, and the 5 ms median
left no headroom.
- Fix: the test wraps `_poll_interval`, which records each interval and
signals the moment the waiter starts a poll's sleep. The lock is
released right then, so the whole interval stands between the waiter and
the lock.
- Assertions: every interval the front waiter asks for is ≤ 2 ms, and
the median hand-off is < 15 ms. A 20 ms poll always waits at least 20
ms, so it fails the median even with the bound widened.
- Break checks: `_NEXT_POLL_SECONDS = 0.02` or `0.1` fails the interval
assertion. Sleeping `_POLL_SECONDS` directly, so `_poll_interval` is
bypassed, fails the median (20.8 ms).

**`test_a_dropped_idle_connection_is_logged[True]`** (Linux)
- Cause: the test asserted that `"Traceback"` was absent from the stderr
captured by `capsys`. The traceback in that run came from a fake
Lemonade server that `test_lemonade_shared_server.py` left running on
the same xdist worker (`BrokenPipeError`).
- Fix: the `serve` fixture records the bridge server's own
`handle_error` calls, and the test asserts that list is empty.
socketserver calls `handle_error` before it closes the connection, so
the check doesn't race. A plugin that writes a traceback to stderr
during the test fails main's version and passes the new one.
- Break check: making `log_error` also call the base `log_error`, and
reverting `str(args[0])`, raises `TypeError` in the handler, and the
test fails.

**Isolation fixes**
- `test_folder_indexing.py`: `temp_folder` now lives in
`isolated_gaia_home`, a per-test fake home, so `ensure_within_home`
still admits it. Parallel workers no longer share or delete
`~/.gaia/test_temp`.
- `test_issue_841…`: the test now sets `GAIA_HOME` itself, so an
inherited value can't override the patched `Path.home`.
- `tests/electron/setup.js`: `os.homedir()` points at a per-file temp
dir. It is assigned rather than spied, so `jest.restoreAllMocks()` can't
undo it. Setting `HOME` would not work, because Jest's sandboxed
`process.env` never reaches `os.homedir()`.
- The "Ignoring invalid agents section in …\.gaia\tray-config.json" log
came from `crash-loop-notification.test.cjs`, which mocks `fs` with a
config the validator rejects. The real file was never read, but the path
now names the temp home.
</details>
…-folders

Main shipped contract 2.19 for changes_turn_id (amd#5553), so surface moves
to contract 2.20: the server, relay floor, npm API_VERSION, OpenAPI
artifact, bundled docs and tests now say 2.20, and the relay sends both
fields to a sidecar that takes them.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Merged main. Main already used contract 2.19 for file-change undo (#5553), so surface is now contract 2.20. A 2.19 sidecar is not sent the field; a 2.20 one gets both changes_turn_id and surface.

🔍 Technical details
  • API_VERSION, the npm API_VERSION, min_surface_api_version, the OpenAPI artifact (regenerated), SPEC/SKILL/README/CHANGELOG and docs/guides/gaia.mdx all say 2.20; test_relayed_surface.py and test_server_surface.py now pin 2.20 as the floor and 2.19 as too old.
  • The evidence in the PR body was captured against the pre-merge 2.19 build; the behaviour is unchanged, only the version number moved.
  • Checks: tests/unit/chat plus the sidecar relay, changes, query, surface and OpenAPI tests: 2425 passed. hub/agents/gaia/npm npm test: 151 passed.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Heads-up: this PR and #5649 both add a surface field to /query, and both call it contract 2.20. They define it differently: #5564 makes it optional (agent_ui, tui, cli), and #5649 defaults it to "service" and adds that value. Whichever merges second needs one shared definition and the next contract version.

# Conflicts:
#	hub/agents/gaia/npm/CHANGELOG.md
#	hub/agents/gaia/npm/README.md
auto-merge was automatically disabled October 23, 2026 08:33

Head branch was pushed to by a user without write access

@kovtcharov

Copy link
Copy Markdown
Contributor Author

Merged current main in; two doc conflicts, both kept additively, and the tests pass.

  • gaia npm CHANGELOG: main added an unversioned "A tool result keeps the tool's own status" entry above the contract heading. Kept it, then this PR's "contract 2.20" section with its surface and folders entries.
  • gaia npm README: main added a "Approving tool calls by policy? Match on args" paragraph where this PR added the surface one. Kept both.
  • Contract version: main is still on 2.19, so 2.20 is still the next free number. No stray 2.19 is left in the server, OpenAPI file, npm package or docs, and the committed openapi.gaia.json still matches the live schema.

Tests: tests/unit/chat (including this PR's session-prompt tests) plus the relay and confirmation suites (2328 passed, 5 skipped). Black and isort are clean.

# Conflicts:
#	src/gaia/ui/_chat_helpers.py
# Conflicts:
#	hub/agents/chat/python/gaia_agent_chat/agent.py
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 23, 2026
Merged via the queue into amd:main with commit 01db252 Oct 23, 2026
39 of 40 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/agent-knows-its-folders branch October 23, 2026 12:25
kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Oct 24, 2026
…t errors (amd#5649)

A headless caller of the `/v1/gaia/*` service whose model server went
down got "Cloud request through Lemonade failed … check the TUI provider
settings". That was wrong on three counts: the model was local, no
Lemonade was involved, and there was no TUI (amd#5295). The investigation
went toward cloud credentials instead of a LAN host that couldn't be
reached. Now a failed model request names the server that failed
(host:port, credentials stripped), and says "through Lemonade" only when
it was. `/query` takes an optional `surface` field, so the advice fits
the caller: headless callers are pointed at the server's base URL, while
the TUI and the Agent UI keep their own wording. The first half of
amd#5295, failed runs ending as normal answers, was already fixed by amd#5432.

Closes amd#5295

- Contract 2.20: `surface` is the same optional field amd#5564 added
(`agent_ui`, `tui`, `cli`); leaving it out now means a headless caller
for error wording. The TUI and the Agent UI relay send it only to a
2.20+ sidecar. A front-end older than this release gets the headless
wording; the CHANGELOG notes this skew.
- Exception classes and classifier anchor strings are unchanged, so
error classification is the same. One eval-sensitive string is left as
is: "Couldn't reach the local LLM". Watch `error_recovery` on the next
RC; only the failure-answer wording changed.
- Memory's startup notice also names a user-set model server instead of
"the Lemonade embedding service".

## Test plan
- [x] Real repro of the report: the flagship's headless service pointed
at a local stub that returns 502 for everything, model `gpt-oss-20b`,
POST `/v1/gaia/query` with no `surface`. The `final` event has `failed:
true`, names `127.0.0.1:<port>` once, and doesn't mention the TUI.
- [x] Fake-server tests for a local endpoint returning 502, streaming
and non-streaming: the host is named, and the backend's JSON error body
still parses
- [x] TUI (Go) sends `surface: "tui"` only to a gaia sidecar at 2.20+;
the Agent UI relay does the same
- [x] Affected suites: 921 pass; `util/lint.py --all` passes; OpenAPI
artifact `--check` is current

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
github-merge-queue Bot pushed a commit that referenced this pull request Oct 27, 2026
…5844)

Asked to save a file "in my Documents folder", GAIA wrote it into
`~/.gaia/documents`, its own hidden folder, every time, so the user
would never find it. Now it saves to the user's `~/Documents`. Finding
an existing file "in my documents folder" still checks GAIA's folder
first, which is what #5564 fixed.

Refs #5843. It stays open until #5885 lands: on a Windows PC with
Documents moved to OneDrive, or Linux with a translated Documents
folder, this still names a folder the user won't find.

**LLM-affecting** (system prompt). No eval hardware here; watch
`tool_selection`, `gaia_tool_selection` and `error_recovery` on the next
RC.

## Test plan
- [x] Live, from source, same model as the report (DeepSeek V4.1 Flash
via Lemonade → Fireworks), Agent UI folder scope, every write denied:
- "save … shopping.txt in my Documents folder": `main` targets
`~/.gaia/documents/shopping.txt` 3/3; this branch targets
`~/Documents/shopping.txt` 3/3, in one call
- "summarize vendor_contract.md in my documents folder" (file seeded in
GAIA's folder): both read it from GAIA's folder on every run, never
touching `~/Documents`; 2.6 vs 3.2 calls on average over 5 runs, within
run-to-run noise
- [x] `tests/unit/chat/test_session_prompt_context.py`: 11 passed; the
new test fails on `main`
- [x] Prompt, budget and profile-spec tests in `tests/unit/chat` and the
chat and gaia hub suites: no new failures against `main`
- [ ] Next RC eval: the three categories above

No before/after screenshot: the change is one sentence of system prompt,
and what it changes is which path the model picks. The live runs above,
from source with the same model and the Agent UI's folder scope, measure
that directly. The before state, an approval prompt naming
`~/.gaia/documents/shopping.txt`, is in #5843.

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

The extra sentence is added only when GAIA's documents folder is in
scope, since that's the only time the two folders can be confused. I
tried two other wordings: one that didn't name the path, and one that
rephrased the "look here first" sentence. The first sent a denied write
back into GAIA's folder on a retry. The second made reads search first.
This one kept both cases right.
</details>

---------

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

devops DevOps/infrastructure changes documentation Documentation changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants