Skip to content

fix(skills): load the coding skill when pytest is only in a virtualenv - #3791

Merged
kovtcharov-amd merged 9 commits into
amd:mainfrom
kovtcharov:claude/skill-missing-binary-substitute
Sep 28, 2026
Merged

kovtcharov-amd merged 9 commits into
amd:mainfrom
kovtcharov:claude/skill-missing-binary-substitute

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

GAIA refused its coding skill whenever the pytest executable was not on the global PATH. That is the usual state for a Python project, where pytest lives in a virtualenv. In a benchmark run where models could see and load skills, 42 of 48 attempts to load coding were refused, so models lost the skill's guidance on the very tasks it was written for.

A missing command now refuses a skill only when nothing can stand in for it. pytest can: the skill loads, and load_skill tells the model to run the suite through execute_python_file with pytest.main. gh cannot, so a missing gh still refuses github-triage.

The refusal also appears to derail models. Every one of 12 benchmark runs that ended in "I had trouble formatting my tool call" had a refused coding load earlier in the turn; the build before skills became visible had none. It is an association, not a measured cause: a re-run of those cells with this fix will show whether they recover.

Closes #3790

Test plan

  • pytest tests/unit/test_skill_binary_grants.py: a missing pytest resolves without refusing and is reported as unavailable; an installed one is never reported; missing gh still refuses.
  • pytest hub/agents/gaia/python/tests/test_skill_library_tools.py: load_skill on a pytest-declaring skill with pytest off PATH succeeds, returns unavailable_commands: ["pytest"] with the substitute in warning, and grants nothing.
  • pytest tests/unit/test_skill_binary_grants.py hub/agents/gaia/python/tests/test_skill_library_tools.py tests/unit/test_starter_skills.py tests/unit/test_skills_manager.py: 523 pass.
  • Live, the real flagship loading the real coding skill with pytest absent from PATH. main fails with "Skill 'coding' needs the 'pytest' command, which is not on PATH…". This branch loads it with the warning "'pytest' is not on PATH, so this skill's pytest steps cannot run as written. Run the suite with execute_python_file…".
  • gaia eval agent: it changes what the model is told on skill load. It can't run on this machine (no claude CLI for the judge).

The coding skill was refused outright unless a pytest executable sat on the
global PATH, which is not where most projects keep it. In one benchmark run,
42 of 48 attempts to load it failed this way.

A command policy can now name a substitute. When the command is missing and a
substitute exists, the skill loads without that grant and load_skill tells the
model what to do instead: for pytest, run the suite through execute_python_file
with pytest.main. gh has no substitute, so a missing gh still refuses
github-triage.

Closes amd#3790

Co-Authored-By: Claude Opus 5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

Good fix for a real problem — a skill that names pytest no longer gets refused just because pytest lives in a virtualenv, which is the normal state of a Python project. The core gate change and its tests are clean. Two things need closing before merge.

The skill's own text still tells the model the opposite. The coding skill's instructions say it grants pytest and to run it directly, and those instructions sit in the system prompt for the whole session — while the "use pytest.main instead" advice is a single tool reply that scrolls away. When the model follows the skill body and runs pytest, the shell gate answers that the command is only granted to a skill that declares it and tells the model to load that skill first — which is now false and points at a retry that changes nothing. Soften the skill's wording and make the substitute stick where the model keeps reading it.

The advice reaches the model on only one of the two ways a skill gets loaded. An agent that pre-loads skills from its manifest never goes through the library tool, so the skill loads without the grant and nothing is said at all. The substitute belongs at the place skills are loaded, not only in the tool wrapper.

One doc still states the old rule. The permission-model spec says a missing binary refuses the skill at load. That is no longer true for a binary with a substitute, and the project's rule is that a behavior change updates every doc that describes it in the same change.

Real-world evidence

No evidence bundle was produced for this PR (evidence-bundle.md absent), and pytest is not installed on this review runner, so I could not execute the suite or the skill-load path myself. The PR description does carry author-reported manual before/after for the real surface: on main the load is refused with "Skill 'coding' needs the 'pytest' command…", on this branch it loads and returns the substitute warning. That matches what the code does on reading, and I'm relaying it as the author's report, not as something verified here. The agent eval is marked unrun with a reason (no judge CLI on that machine); since this changes what the model is told at skill load, it is worth one run by someone with judge access before this ships.

🔍 Technical details

Issues

🟡 The loaded skill body contradicts the new state, and the shell refusal misleads (hub/skills/coding/SKILL.md:67)

The skill says "This skill grants pytest, so run it directly" and that text is in the system prompt for as long as the skill is loaded. The substitute lives only in the load_skill tool payload (skill_library_tools.py:559-569) — one turn, then gone. A model that follows the persistent text hits shell_tools.py:587-596:

Command 'pytest' is not available to this agent. It is granted only to a skill that declares 'shell:execute:pytest' in its SKILL.md — load that skill first.

The skill is loaded, so that hint invites a no-op reload loop. Two fixes, ideally both: reword SKILL.md:67 so the grant is conditional on pytest being on PATH and name the execute_python_file route there, and make the refusal distinguish "ungranted" from "granted-but-not-installed" (BINARY_POLICIES[binary].substitute is available at that point).

🟡 Only the tool path tells the model anything (src/gaia/agents/base/agent.py:1839, :2188)

Agent.load_skill calls resolve_binary_policies, which now silently continues past a missing substitutable binary — no grant, no log, no prompt note. Agents loading a skill set from a manifest (load_skill_set, agent.py:2188) never pass through SkillLibraryToolsMixin, so they get the degraded skill with zero signal. Consider surfacing the substitute from the loader itself — e.g. appending it to the skill's prompt fragment — so both paths behave the same and the note persists across turns. At minimum, log the skipped grant in binaries.py:637-639; today that branch leaves no trace anywhere.

🟡 Spec doc still states the pre-PR rule (docs/plans/skill-format.mdx:388)

The binary must be installed. load_skill checks PATH and refuses with the install command when it is missing.

That is now conditional on substitute being empty. docs/guides/starter-skills.mdx:189 (the gh case) is still correct and needs no change.

Nits

🟢 load_skill's Returns: docstring still describes warning as tools-only (src/gaia/agents/tools/skill_library_tools.py:489-490):

                costs. A "warning" key appears when the skill's instructions
                depend on tools this agent does not have, or on a command that
                is not installed here.

🟢 unavailable_binaries is not re-exported from gaia.skills.__init__ while its sibling resolve_binary_policies is (src/gaia/skills/__init__.py:44, :208) — the mixin imports it from the private module path instead.

Strengths

  • The opt-in shape is right: substitute defaults to empty, so every existing policy keeps refusing, and the test asserts exactly that (tests/unit/test_skill_binary_grants.py:168 — gh still refuses). The escape hatch can't widen by accident.
  • Tests cover both directions of the new predicate (missing-with-substitute, and installed-never-reported) plus the end-to-end load_skill payload, including the negative assertion that no grant was issued.
  • The docstrings on BinaryPolicy.substitute and resolve_binary_policies explain the why, and the comment on the pytest entry names the real-world condition (virtualenv) rather than restating the code.

…y load path

The coding skill still told the model to run pytest directly, and a refused
pytest call told it to "load that skill first" even with the skill loaded, so
a model without pytest on PATH was pointed at a reload loop. Agents that load
skills from a manifest got no substitute at all.

- The loaded skill's prompt now carries a note naming the missing command and
  its substitute, rendered every turn, so the load_skill tool and manifest
  loads behave the same. The skipped grant is logged.
- The shell gate says a policed binary is not installed (with the substitute
  or install hint) instead of blaming a missing skill.
- coding SKILL.md makes direct pytest conditional on PATH and names the
  execute_python_file + pytest.main route; version 0.1.1.
- skill-format.mdx states the substitute exception to the missing-binary rule.
- unavailable_binaries is re-exported from gaia.skills.

Co-Authored-By: Claude Opus 5 <[email protected]>
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Thanks — all five points are addressed in 0edca9c.

  • Skill text no longer contradicts itself. The coding skill now says to run pytest directly only when it is on PATH, and otherwise to run the suite through execute_python_file with pytest.main.
  • The shell refusal tells the truth. When a command is not installed, the model hears exactly that, plus the substitute (pytest) or the install command (gh), and is told a reload won't help. "Load that skill first" now appears only when the command is installed but ungranted.
  • Both load paths say the same thing, every turn. The substitute note is now part of the loaded skill's prompt, so manifest-loaded skills get it too and it doesn't scroll away. The skipped grant is also logged.
  • Spec updated. skill-format.mdx now states the substitute exception. The starter-skills guide's gh line is still correct, and no other doc states the old rule.
  • Nits done. The docstring now mentions the command warning, and unavailable_binaries is re-exported from gaia.skills.

Not run: gaia eval agent. This machine has no claude CLI for the judge. Since this changes what the model sees in its prompt, one eval run by someone with judge access before merge is still worthwhile. The benchmark evidence for the underlying fix: in a catalogue run, 42 of 48 coding loads were refused over pytest; with this fix, 6 runs had 0 refusals. That is from the earlier benchmark campaign; I did not rerun it for this follow-up.

PR description footer: the "Generated with Claude Code" line conflicts with CLAUDE.md, but this session's instructions require it, so I left it. A maintainer should decide which rule wins.

🔍 Technical details

Changes

  • BinaryPolicy.unavailable_note() is the single wording used by the tool payload, the prompt note, and the shell refusal. It falls back to install_hint when substitute is empty.
  • _skill_prompt_body() in agent.py wraps effective_skill_body in both branches of get_skills_system_prompt (filtered and unfiltered). It calls unavailable_binaries at render time instead of storing state at load, so unload needs no cleanup. shutil.which only runs for skills declaring a binary that has a substitute.
  • resolve_binary_policies logs a WARNING on the substitute skip branch.
  • _validate_command: in the ungranted branch, shutil.which(policy.binary) is None now returns the not-installed error before the "load that skill" error.
  • hub/skills/coding/SKILL.md goes to 0.1.1, matching the repo's habit of bumping a skill's version when its body changes. test_starter_skills.py only requires a non-0.0.0 version and pins no content.

Tests

  • test_skill_binary_grants.py: the existing gh refusal test now monkeypatches gaia.agents.tools.shell_tools.shutil.which to a path, so it holds on runners without gh. A new test patches it to None and checks the pytest refusal carries the substitute (and never says "load that skill first"), and that gh's carries the install hint.
  • test_skills_manager.py: a new Agent.load_skill test (the manifest path, no tool wrapper) checks there's no grant, the log line is emitted, and pytest.main appears in the skill prompt.
  • test_skill_library_tools.py: the tool-path test also checks the note is in get_skills_system_prompt().

Results (local)

  • test_skill_binary_grants, hub test_skill_library_tools, test_starter_skills, test_skills_manager, plus the other skill-prompt suites (test_agent_lazy_skill_prompt, test_system_prompt_composition, test_skill_sets, test_adaptive_skills, test_skills_consume, test_skill_discovery_integration, hub test_skill_prompt_budget): 713 passed, 16 skipped.
  • tests/unit/agents/test_verification_scope.py: 70 passed.
  • Shell suites (test_shell_guardrails, test_shell_output_encoding, test_shell_rewrite_redirect, test_powershell_command_injection): 100 passed, 2 skipped.
  • Black and isort are clean on the changed lines.

@github-actions github-actions Bot added the documentation Documentation changes label Sep 14, 2026
`shutil` is already imported at module scope; the local one inside the
Unix-to-Windows command mapping shadowed it and failed Pylint's W0404,
which the code-quality gate treats as blocking.
@kovtcharov

Copy link
Copy Markdown
Contributor Author

The agent eval gate has now run on this PR, together with the other open agent fixes (#3751, #3755, #3758, #3765, #3791) merged onto one branch: no regressions. Every category passes the same scenarios as the unchanged base commit, and no scenario flipped between pass and fail.

🔍 Technical details

Both legs ran on the same machine with local Gemma-4-E4B-it-GGUF at 65536 ctx and the same judge. Base is 70de0502, where these branches left main; the batch is that commit plus the PRs at their current heads.

Category Base Batch Avg score
tool_selection 4/5 4/5 8.4 → 8.8
rag_quality 7/8 7/8 9.4 → 9.4
context_retention 4/4 4/4 9.6 → 9.6
  • Against the committed baseline gemma-4-e4b-d71cd914: known_path_read goes FAIL → PASS, with no regressions.
  • data_vs_recall_disambiguation fails on both legs. Over three runs each the base averages 5.4 and the batch 5.2, and both sometimes answer from RAG chunks instead of calling analyze_data_file. It is a model miss that predates these changes.
  • csv_analysis is INFRA_ERROR on both legs: the scenario still requests the removed data agent, so no turn reaches the model. Pre-existing and unrelated.

# Conflicts:
#	src/gaia/agents/tools/shell_tools.py
#	src/gaia/skills/binaries.py
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Merged main in and resolved the two conflicts. The branch is mergeable again; nothing about what this PR does changed.

Both conflicts were with the shell rewrite that landed in #4049, and main's version won in each place it had moved the code — the branch's own change (refusing a not-installed binary outright, instead of telling the model to reload a skill) sits untouched in _validate_command.

🔍 Technical details
  • shell_tools.py top-of-file: kept both import shutil (the branch needs it for the shutil.which(policy.binary) pre-check) and main's new import signal.
  • shell_tools.py body: main hoisted the Windows use_shell / _UNIX_TO_WIN logic out of _execute_shell_command into the module-level _run_step. Took main's side wholesale and dropped the now-redundant function-local import shutil there, which is what commit bf93d6ab4 was after in the first place.
  • binaries.py: purely additive. BinaryPolicy keeps the branch's substitute + unavailable_note() and main's python_module; both docstring entries kept.

Tests on the merge result: tests/unit/test_skill_binary_grants.py, test_starter_skills.py, test_skills_manager.py, hub/agents/gaia/python/tests/test_skill_library_tools.py — 564 passed, 15 skipped. Shell suites (test_shell_compound_commands, test_shell_guardrails, test_shell_pipelines, test_shell_env_assignment, test_shell_output_encoding, test_powershell_command_injection) — 160 passed.

# Conflicts:
#	src/gaia/agents/tools/skill_library_tools.py
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Sep 24, 2026
…g one (amd#3765)

GAIA almost never used its skills on real work. Before each turn it
scored the user's words against skill descriptions, and on a 24-task
benchmark that loaded a skill **zero** times. Precise requests score
lowest, because repo names, issue numbers and output formats count
against the match. Without `github-triage` loaded, `gh` is refused too,
so most models never tried it.

The flagship now lists every installed skill, one line each, in its
system prompt, and the model calls `load_skill` when the work fits — at
the start of a task or partway through. The list only changes when a
skill is installed, so it stays cached. It costs **1,062 tokens** for
the starter pack. This deletes the retriever and discovery machinery
(−2,339 / +334 lines).

- **Refusals name the skill.** A refused `gh` or `pytest` now says which
skill to load, instead of "a skill that declares it".
- **Latent prompt bug fixed.** ChatAgent dropped any prompt section
containing the words "Stable Diffusion". The catalogue mentions it (the
`image-gen` skill), so the whole catalogue vanished with no warning. The
filter now matches the method that produced the section.

Closes amd#3764. Supersedes amd#3763.

## Test plan

- [x] `pytest tests/unit/test_skill_catalog.py
tests/unit/test_skill_binary_grants.py`: every installed skill listed
with its description; stable across renders; `.claude/skills` imports
not listed; the granting skill found for `gh` and `pytest`; refusals
name it, or point at the hub when none is installed.
- [x] `pytest
hub/agents/gaia/python/tests/test_full_tool_bundles.py::test_skill_catalogue_renders_for_the_flagship`:
the catalogue reaches the real flagship prompt. It failed before the
Stable Diffusion filter fix.
- [x] Targeted suites (skills, prompt composition, verification scope,
flagship tests): 947 pass. `pytest tests/unit -k "skill or prompt or
shell"`: 1,961 pass. The 6 failures also fail on untouched `main`:
`search_documentation` is absent from this environment, and the profile
goldens drift on audio wording.
- [x] Flagship system prompt measured: 3,130 → 4,192 tokens, sourcing
rule still present.
- [x] Benchmark A/B, the same 144-run battery before and after (six
Fireworks models), all batches complete: **101 vs 100 passes overall**.
GitHub tasks 10/30 → **17/30**; runs that loaded a GitHub skill 4 → 16,
runs that used `gh` 4 → 14. Adversarial tasks 19/30 → 15/30, all 4
points lost by minimax-m3; deepseek-v4p1-flash went 21 → 24/24 and
kimi-k2p7-code 19 → 22. Visible skills also exposed amd#3790: `coding` was
refused over pytest in 28 runs, which amd#3791 fixes.
- [ ] `gaia eval agent`: required by CLAUDE.md for prompt changes. It
can't run on this machine (no `claude` CLI for the judge).

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: Ovtcharov <[email protected]>
Co-authored-by: f <f@f>
Co-authored-by: kovtcharov-amd <[email protected]>
Both sides changed how a missing binary is explained to the model, so the
resolution keeps both intents rather than either one.

- main taught `python -m pytest` and maps that spelling onto the pytest
  grant, so an absent pytest refuses it too. The substitute text now says
  so and points at execute_python_file, which works wherever pytest is
  importable.
- The shell refusal keeps main's grant-route message ("load skill X") for
  an installed-but-ungranted binary, and uses this branch's
  not-installed message only when the binary is genuinely absent —
  reloading a skill cannot fix that.
- main's three grant-route tests now pin gh onto PATH; without that the
  not-installed refusal would answer first on a runner that lacks gh.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Conflicts with main are resolved and pushed — this branch is mergeable again, and its tests and lint are green. It still needs an agent eval before it can land, and that is the one thing I could not do.

This PR changes what the model reads: the skill text gains a sentence when a declared command is missing, and load_skill's schema description was reworded. That is an LLM-affecting surface, so CLAUDE.md requires a run — and the flagship eval gate skips fork PRs, so nothing here covers it automatically (every eval check on this PR shows SKIPPED for that reason, not because the paths didn't match).

Needed before merge: gaia eval agent --category gaia_skills_lifecycle, plus gaia_shell — those two categories are the ones that exercise skill loading and the shell refusal path this PR rewrites. Kick it off from a machine with a free Lemonade, or dispatch Agent Eval — flagship against the branch.

I could not run it on the triage machine: its single Lemonade backend already had four concurrent eval runs against it, and a fifth would have produced a race-corrupted scorecard rather than a measurement.

🔍 Technical details

The merge kept both sides' intent rather than either one:

  • main now teaches the python -m pytest spelling and maps it onto the pytest grant via policy_argv, so an absent pytest refuses that spelling too. The substitute text and hub/skills/coding/SKILL.md now say so and route to execute_python_file.
  • The shell refusal keeps main's grant-route message for an installed-but-ungranted binary, and uses this branch's not-installed message only when the binary is genuinely absent.
  • main's three grant-route tests now pin gh onto PATH via a fixture. Without it the new not-installed branch answers first, and those assertions would fail on any runner that lacks gh — a silent cross-side break that neither diff shows on its own.

Local verification: 790 passed / 15 skipped across the skill suites, 539 passed / 33 skipped across the shell and skill-prompt suites, util/lint.py clean apart from a pre-existing Windows-only pylint false positive in src/gaia/security.py, which this PR does not touch.

A missing binary with a substitute still loads the skill; one without a
substitute now names the setup route main added. The ungranted-pytest test
stubs the binary as installed, which is the case it describes.
@github-actions

Copy link
Copy Markdown
Contributor

🟡 The new "not installed" refusal steers the agent away from installing the CLI itself. When a CLI with a guided setup (today gh) is missing and the agent tries it before loading the skill, the refusal now says "do not reload the skill" and gives only the manual install hint. The ask-to-install path from #3335 (install_cli / sign_in_cli, offered through the skill load) is never mentioned, so the agent is likely to hand the user a manual install step instead of offering to do it. After an install, "reloading a skill will not change that" is also wrong.

Suggested fix: use the new branch only for policies with a substitute. Otherwise, name the setup route when the policy has a BinarySetup.

🔍 Technical details
  • src/gaia/agents/tools/shell_tools.py — the new elif shutil.which(policy.binary) is None: branch runs for every policed binary, including gh (setup=BinarySetup(...)). The branch before this change sent the model to load_skill, and resolve_binary_policies then raised with "Ask GAIA to set up gh…". This branch skips that remedy.
  • BinaryPolicy.unavailable_note() hard-codes "reloading a skill will not change that". That is false for any policy with setup, where installing the CLI and then reloading is exactly the fix.
  • Narrowest fix: elif policy.substitute and shutil.which(policy.binary) is None:. If you want the not-installed wording for every binary, make unavailable_note() add the check_cli_setup/install_cli route when policy.setup is not None, and drop the "do not reload" hint in that case.
  • test_a_binary_that_is_not_installed_is_not_blamed_on_a_missing_skill currently asserts the gh case returns only install_hint. It needs updating whichever option you pick.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Sep 28, 2026
Merged via the queue into amd:main with commit e633b0e Sep 28, 2026
37 of 41 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the claude/skill-missing-binary-substitute branch September 28, 2026 17:26
@itomek

itomek commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Folded into #4408, which carries this change together with the other two PRs that rewrite the same refusal branch in the shell tool. Landing any two of the three without the third leaves the guard describing behaviour that no longer exists, so they are being reviewed and tested as one story.

Nothing here is dropped. The replay is in #4408's merge commits, and anywhere the two PRs disagreed with each other or with main, the resolution is named in the commit message and called out in the PR description. This PR will be closed once #4408 merges.

@itomek itomek self-assigned this Sep 28, 2026
@itomek

itomek commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Landed on main as part of #4408 (merge commit 2927f1a1), which carried this change together with the other two PRs that rewrite the same refusal branch in the shell tool.

Every commit from this branch is an ancestor of what merged — git merge-base --is-ancestor confirms it — so nothing here was dropped or rewritten. Closing.

kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Sep 28, 2026
… refuse, one name for full access (amd#4408)

Three open PRs rewrite the same refusal branch in the agent's shell
tool, and landing any two without the third leaves guard messages
describing behaviour that no longer exists. This folds all three into
one branch so the shell story can be reviewed and tested as one thing.

**What a user gets.** The agent stops refusing work you are sitting
right there to approve: `git commit`, `npm test`, `rm notes.txt` are now
shown to you and run once you say yes, instead of coming back as a flat
"not allowed". A `cd` survives to the next command, so `cd build &&
cmake ..` followed by `make` works the way it reads. And the coding
skill loads on a machine where `pytest` lives only in a virtualenv,
which is most machines.

Replaces amd#3791, amd#3400 and amd#3808.

### The one decision a reviewer should confirm

amd#3400 and amd#3808 forked 143 and 184 commits back, and main moved under
both. Where the two disagreed about behaviour, **main's newer design
won** and amd#3808's older expectations were updated:

- **`git push` stays refused outright** rather than becoming confirmable
— amd#3374 made push/reset/rebase refusals that the `git` grant itself will
not run.
- **Full access keeps the developer command set** rather than lifting
the allowlist entirely, so `rm` and `touch` stay out. amd#3808's own later
commit ("keep unattended runs narrow; leave shell lifting to amd#3394") is
what settled this.

If either call is wrong, it is a small edit here rather than a re-merge.

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

**Merge shape.** `amd#3791` (the only mergeable member) anchors; `amd#3400`
and `amd#3808` were merged onto it in that order, each as a `--no-ff` merge
whose message records its own resolutions.

**One name for full access.** Main carried `console.bypass_permissions`
and amd#3808 added `console.full_access` for the same session-wide grant —
the naive merge shipped both, which would have been a live bug
(`full_access_active()` reading one while `PermissionState` wrote the
other). Collapsed onto `full_access`, keeping main's semantics and
amd#3808's name:

| before | after |
|---|---|
| `console.bypass_permissions` | `console.full_access` |
| `ShellToolsMixin.bypass_gates_active` | `full_access_active` |
| `client.PermissionBypasser` (Go) | `client.FullAccessSetter` |
| `SetBypassPermissions` (Go) | `SetFullAccess` |
| `PermissionState.set_bypass` | `set_full_access` |
| stdio control verb `bypass` | `full_access` |

The HTTP route keeps its original `/v1/{agent}/sessions/{id}/bypass`
spelling — renaming it would break every already-published sidecar.
`--bypass-permissions` and the `bypass` control verb stay accepted as
retired spellings.

**Superseded, deliberately not carried over from amd#3808:**
`_resolve_git_subcommand` and `SAFE_GIT_COMMANDS` (main moved `git` into
`BINARY_POLICIES` with a read-only ungranted floor), its git-subcommand
branch, and its SPEC claim that `/tool_decision` and the session toggle
are stdio-only (contract 2.14 gave HTTP both).

**`shell_session` is a new bundle, not two more members of `shell`.**
Folding `get_shell_state` / `reset_shell_session` into `shell` put it at
7 members, over `MAX_BUNDLE_MEMBERS` — a cap that exists so one pull-in
cannot exhaust the dynamic-tool slots. Registered tool count 86 → 88,
with `gaia-agent.yaml`, `gaia_agent/__init__.py`, `CAPABILITY_MATRIX.md`
and the guide updated together.

**Two fixes that fell out of the merge rather than out of any of the
three PRs:**
- Under full access a shell keyword (`for`, `while`) was reported as
"not in the developer command set" instead of being named as control
flow. `_validate_bypass_command` now names it, because no mode can run
it.
- `wait_for_condition` refused a confirmable predicate in front of the
prompt — the same dead end the confirm tier exists to remove.

**One stale test corrected:**
`test_a_pipe_is_refused_for_its_binary_not_for_the_pipe` asserted the
exact grant-id refusal for `pytest`, which amd#3791 replaces with a "not
installed" refusal wherever `pytest` is not on `PATH`. It passed in CI
only because CI has `pytest` on `PATH` — exactly the hidden-state
masking CLAUDE.md warns about. It now holds in both machine states.

</details>

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Ovtcharov <[email protected]>
Co-authored-by: f <f@f>
Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov-amd added a commit that referenced this pull request Sep 28, 2026
…profile pins

#4038's docstring trim dropped "call it directly as a tool instead" from
run_python's no-tool-access warning, leaving only what NOT to do without
the actionable alternative -- restored within the same char budget.

Also refreshes test_tool_loader_token_budget.py's doc-profile pins: the
tool count drifted from 39 to 44 (and char/token counts with it) as
today's merges (#3122, #4021, #3335, #3791, #4376, and others) each added
or exposed a doc-profile tool. Re-measured all five values fresh rather
than estimating.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents documentation Documentation changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The coding skill is refused whenever pytest lives in a virtualenv

3 participants