Skip to content

[DOCS] Document the CLI tools policy in ~/.infer/tools.yaml #914

Closed

Description

@edenreich

Summary

The CLI moved the whole tools: section out of config.yaml into a userspace-only ~/.infer/tools.yaml (inference-gateway/cli#1507, inference-gateway/cli#1501). infer config set tools.* is now rejected, infer config get tools.* still works, and the INFER_TOOLS_* env overrides are unchanged. A project .infer/config.yaml can no longer change tool approval, and infer's file tools never write tools.yaml, the same way they never write sandbox.yaml.

The keys that apply to every tool (enabled, custom_dir, max_result_bytes, safety) sit at the top of tools.yaml, and each tool's section sits under tools:. infer config get and INFER_TOOLS_* still name them all tools.<key>, for example tools.safety.require_approval and tools.bash.timeout:

# ~/.infer/tools.yaml
safety:
  require_approval: true
  approval_behaviour: judge
tools:
  bash:
    mode:
      standard:
        allow:
          - make test

Acceptance Criteria

  • cli.md (around lines 2256-2314) replaces the infer config set tools.* examples with ~/.infer/tools.yaml snippets (global keys at the top, each tool's section under tools:) or INFER_TOOLS_* env vars
  • cli-judge-mode.md (line 136) sets safety.approval_behaviour: judge in ~/.infer/tools.yaml instead of running infer config set tools.safety.approval_behaviour judge
  • The CLI configuration pages list tools.yaml next to sandbox.yaml as a userspace-only file the agent cannot write
  • The pages describe the change without tracker links, as AGENTS.md in this repo requires

Activity

  1. added
    documentation
    on Oct 2, 2026
  2. added theissue type on Oct 2, 2026
  3. edenreich commented on Oct 2, 2026

    @edenreich
    ContributorAuthor

    @claude can you document this?

  4. inference-gateway-maintainer commented on Oct 2, 2026

    @inference-gateway-maintainer
    Contributor

    Claude finished @edenreich's task in 5m 3s —— View job • docs/issue-914-20261002-2208 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-914-20261002-2208?quick_pull=1&title=Issue%20%23914%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23914%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documented the ~/.infer/tools.yaml policy file

    • Gather context (cli.md, cli-judge-mode.md, sandbox.yaml precedent, upstream CLI change)
    • Rewrite cli.md Tool Configuration around ~/.infer/tools.yaml
    • Flatten every tools YAML snippet to root-level keys with a # ~/.infer/tools.yaml path comment
    • Drop the remaining infer config set tools.* examples
    • List tools.yaml next to sandbox.yaml as a userspace-only, agent-unwritable policy file
    • cli-judge-mode.md sets safety.approval_behaviour: judge in the file
    • Also fixed cli-channels.md (Schedule tool) and cli-scheduling.md
    • Validate: format:check, lint:md, build - all pass
    • Commit and open PR

    PR: #915

    What changed

    cli.md - Tool Configuration now documents ~/.infer/tools.yaml with a flat sample plus the guarantees it shares with sandbox.yaml: project copies and a tools: block in any config.yaml are ignored, the file tools refuse to write it, infer config set tools.* is rejected while infer config get tools still prints effective values, and INFER_TOOLS_* overrides are unchanged (set-but-empty wins). Ten tools:-wrapped YAML blocks (Bash per-mode allowed-list, gh baseline, Wait, WebSearch, WebFetch, ImageEdit, ImageVariation, Agent, command allow-listing, the controlled-autonomy CI profile) are flattened to the file's root-level form. The configuration-files table gains a tools.yaml row (User only) next to sandbox.yaml, the config.yaml row says a tools: block there is ignored, infer init's seed list and the Security Features list mention it, the config tools * command-mapping rows point at the file instead of config set, and Custom Tool Security no longer claims a project .infer/config.yaml can change the approval policy.

    cli-judge-mode.md sets safety.approval_behaviour: judge in ~/.infer/tools.yaml; cli-channels.md moves the Schedule enablement snippet there; cli-scheduling.md names the gate as schedule.* in that file.

    Not done

    The fourth acceptance criterion - linking back to the CLI pull request - is intentionally skipped: this repo's AGENTS.md forbids referencing GitHub issues or pull requests in doc content, so the behavior is described instead and provenance stays in the changelog. Say the word if you want the link in anyway.
    | Branch

  5. moved this from Todo to In progress in 2026on Oct 2, 2026
  6. inference-gateway-releaser commented on Oct 4, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.21 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions