Skip to content

policyPaths is ignored #19368

Description

@YunosukeY

What happened?

I add a following line to .gemini/settings.json in my repository,

  "policyPaths": [".gemini/policies/tools.toml"],

and create a policy TOML file.
But the policy is ignored.

What did you expect to happen?

Policy TOML files specified in policyPaths is applied.

In my opinion, the following section is the cause.

policyPaths: argv.policy,

I think it needs to be changed as follows:

policyPaths: argv.policy ?? settings.policyPaths,

Client information

Client Information

Note: Some information has been redacted.

 > /about                                                                                                  
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                         │
│ About Gemini CLI                                                                                        │
│                                                                                                         │
│ CLI Version                         0.30.0-preview.0                                                    │
│ Git Commit                          55c628e96                                                           │
│ Model                               gemini-3-flash-preview                                              │
│ Sandbox                             no sandbox                                                          │
│ OS                                  linux                                                               │
│ Auth Method                         Logged in with Google (REDACTED)                                    │
│ Tier                                Gemini Code Assist Enterprise                                       │
│ GCP Project                         (REDACTED)                                                          │
│ IDE Client                          VS Code                                                             │
│                                                                                                         │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Login information

Google Account

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/need-triageIssues that need to be triaged by the triage automation.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions