Where Action Stops: Trust, Policy, Confirmation, and Sandboxing
Gemini CLI's safety boundary is a sequence, not a single switch. Before a requested command or edit can affect a machine, the project may be inspected for trust, the tool call can be evaluated by policy, a person may be asked to confirm it, and the execution can be restricted by a sandbox and a sanitized environment. This chapter follows that sequence so readers can choose an operating mode deliberately and understand what each layer does—and what it cannot do.
The distinction matters in an ordinary code task. A model may receive an instruction from a repository, propose an edit, and ask to run a test. Those events do not have the same authority. The repository's instructions may or may not be loaded. The edit may be a registered capability but still require approval. The test may be allowed by policy but blocked by a sandbox path or network restriction. Gemini CLI's design is easiest to understand when each transition has a clear question: may this project influence the agent, may this tool call proceed, and where may the resulting process reach?
The diagram shows a typical mutating request, not a promise that every read requires approval. It also separates two kinds of trust. Workspace trust concerns project-supplied influence and configuration. Tool policy concerns a particular capability and its arguments. Sandboxing concerns the environment in which an authorized process runs. A strong workflow uses the layers together rather than asking one layer to solve every problem.
Trust decides what the project may influence
A repository is not only source code. It can contain configuration, context files, custom commands, skills, hooks, agents, MCP server definitions, and environment files. Some of those inputs can change what Gemini CLI loads or what processes it starts. Folder trust exists to keep a project from silently supplying that influence before the user has evaluated it.
When trust checking is active, Gemini CLI performs a discovery phase before the trust decision.