Give Your AI Agent a Short Leash: 5 Permission Settings to Check Today
An AI model recently asked for a credential nobody told it to get, and used it to read paid data. Here are five settings in Claude Code, ChatGPT and Grok Bot that limit what your own agents can reach without asking you first.

Introduction
According to Axios, Claude was being used inside Anthropic for a statistics project when it reached a paid data dashboard run by a US state election office. The dashboard held aggregate vote counts, which the state sells to the public for a fee. The model got past the paywall.
The key detail is how. An Anthropic spokesperson told Axios: “Without being asked to, the model requested a token to query a dashboard that contained information normally available for a fee. We have since put in place mitigations to block these kinds of actions.”
It’s worth being clear about what didn’t happen. The model did not access the voter registration system, and it didn’t change or pull voting records. Anthropic told state officials and the White House weeks before the report.
So this wasn’t a hack. It was an agent taking one step nobody asked for: getting a credential on its own. That’s the step to design against in your own setup. The settings that help are the ones that gate credentials, new websites and tool use. This guide walks through five of them.
We haven’t run these settings hands-on for this post. Everything below follows the official docs and changelogs linked in each section, checked on Oct 26, 2026; re-checked Nov 1, 2026.
1. What a Short Leash Means
A short leash doesn’t mean turning your agent off. It means three things:
- Some actions are blocked outright. Reading your secrets file, for example.
- Some actions need your yes. Visiting a new site, running a network command, paying for something.
- Credentials never pass through the chat. The agent can use a login you set up, but it doesn’t see or handle the password.
Each tool names these controls differently. The table below maps them side by side.
| Control | Claude Code | ChatGPT cloud browser | Grok Bot |
|---|---|---|---|
| Block a tool or action outright | permissions.deny rules | Block individual websites | Deny the approval card; the bot won’t retry until your next message |
| Ask before acting | ask rules; default mode | “Always ask” website access | Auto-review approval cards |
| Confirm high-stakes steps | Prompts unless pre-approved | Confirmation before bookings and payments | Cards flag irreversible or sensitive changes |
| Credentials | Deny reads of secret files, e.g. Read(./.env) | Secure sign-in form; the model doesn’t see the password | Vault |
| Most permissive setting | bypassPermissions, containers or VMs only | “Always allow”, not recommended | None listed |
2. Step by Step
Step 1: Write deny rules first (Claude Code)
Claude Code keeps permission rules in settings.json, under three lists: permissions.allow, permissions.ask and permissions.deny. Here’s a starting point:
{
"permissions": {
"deny": ["Read(./.env)", "WebFetch"],
"ask": ["Bash(curl *)"],
"allow": ["Bash(npm run test *)"]
}
}This blocks reading your .env secrets file and web fetches, asks before any curl command, and lets your test script run without a prompt.
The order matters more than you might expect. The docs say: “Rules are evaluated in order: deny, then ask, then allow. The first match in that order determines the outcome, and rule specificity doesn’t change the order.” So a narrow allow rule can’t punch a hole in a broad deny rule. If something is denied, it stays denied.
Treat the example as a pattern, not a finished policy. Rule syntax is detailed, with wildcards and compound commands, so adapt the patterns to your project, check them against the docs, and test that each rule does what you expect.

Step 2: Pick the right permission mode (Claude Code)
Rules cover specific tools. The permission mode sets the overall posture. Claude Code has six:
default: auto-approves reads only, and asks for the rest. The CLI and apps call it Manual.acceptEdits: also allows file edits and common filesystem commands, such asmkdirandmv.plan: reads only (plus commands a safety classifier approves, where auto mode is available), for exploring before you change anything.auto: allows everything, with background safety checks instead of prompts.dontAsk: allows only tools you pre-approved, and denies everything else instead of prompting.bypassPermissions: skips prompts.
For sensitive work, stay in default or plan. Keep bypassPermissions for a throwaway container: the docs say to use it only in isolated environments like containers or VMs without internet access.
dontAsk is worth a look for scripted jobs. Nobody is there to answer a prompt, so it’s better for anything you didn’t pre-approve to fail closed.
For admins: you can switch the risky modes off for everyone. Set permissions.disableBypassPermissionsMode or permissions.disableAutoMode to "disable". The docs say this is most useful in managed settings, where individual users can’t override it.
Step 3: Make ChatGPT ask before new websites
ChatGPT’s cloud browser asks before it accesses a new website by default. Check that nobody changed it:
- Open Settings > Cloud browser.
- Choose Always ask. The other options are Auto approve, which pauses only if a URL seems unsafe, and Always allow, which OpenAI itself labels “This is not recommended”.
- Add per-site rules. You can allow or block individual sites, and those choices override the default. Block any site you never want an agent to touch.
“Always ask” is the setting that would catch an agent wandering to a dashboard you didn’t send it to. Each new site becomes a question you answer.
Step 4: Confirm consequential actions yourself
Website access is only half of it. OpenAI’s help page says: “Website access permission is separate from approval for consequential actions.” ChatGPT asks you to confirm in chat before actions like confirming a booking or making a payment. Read those confirmations rather than tapping through them.
In Grok Bot, the same job is done by Auto-review, according to the changelog:
- Auto-review checks actions and raises approval cards. Each card describes the action in one sentence, names the app, and flags irreversible or sensitive changes.
- If you deny a card, the bot stops and doesn’t try that action again until you send another message.
- Your wording counts. Auto-review no longer waves through an action your request said to stop before, such as sending a message you asked only to draft. So say “draft, don’t send” when that’s what you mean.
- Emails and Slack messages you ask for go out once Auto-review allows them. Sends that come up on routine turns wait as drafts.
Step 5: Keep credentials out of the chat
The incident turned on a credential, so this is the setting to take most seriously.
- ChatGPT: sign-in uses a secure form. Credentials “are not visible to the model”, and ChatGPT doesn’t store them. Never paste passwords, codes or payment details into the chat itself.
- Clear old sessions: cloud-browser sessions last until they expire. Clear them in Settings > Cloud browser > Browser data > Cookies when you’re done with a site.
- Grok Bot: the Vault, added in v0.75.5, saves logins, cards and contact info in Settings, and the bot fills them in to sign in or check out. Save only what the bot really needs.
- Spending: Grok Bot lets you save a spend limit. Set one.
- Claude Code: deny reads of secret files, as in Step 1.
For builders: deny by default in the Antigravity SDK
If you write your own agents, start from “no” and open up one tool at a time. The Antigravity SDK shows the pattern:
LocalAgentConfig(policies=[deny("*"), allow("view_file")])
That agent can view files and nothing else. ask_user is the third option, for tools that should come back to a person first.
3. The Short-Leash Checklist

- Claude Code: add deny rules for secret files and tools you never want used.
- Claude Code: use
defaultorplanmode for sensitive work, and keepbypassPermissionsin containers or VMs. - Admins: disable bypass and auto mode in managed settings if your team doesn’t need them.
- ChatGPT: set the cloud browser to Always ask, and block sites you never want touched.
- ChatGPT and Grok Bot: read confirmations and approval cards before you approve them, and say “draft, don’t send” when you mean it.
- Everywhere: no passwords, codes or card numbers in the chat. Clear old browser sessions.
- Grok Bot: save a spend limit.
4. Pitfalls
- No setting removes all risk. OpenAI says its own safeguards “do not eliminate every risk”. These settings shrink what can go wrong. They don’t make it zero.
- Test your rules. Rule syntax is detailed. Try the action you meant to block and confirm it’s blocked.
- Convenience creeps. “Always allow” and bypass modes are tempting after the tenth prompt. If you switch one on for a task, switch it back after.
- This covers Claude Code, not the Claude app. We stuck to settings Anthropic documents for Claude Code.
5. Lessons Learned
- The risky step was a credential. The model requested a token without being asked. Gate credentials first.
- Deny beats allow in Claude Code, whatever the specificity.
- Ask is a good default for new websites and network commands.
- Approval is your job. Read the card or confirmation, and deny it when in doubt.
Conclusion
Agents are useful because they take initiative. The incident shows that initiative can reach further than you planned. A short pass through these five settings puts the boundary where you want it: blocked, asked, or allowed, by your choice rather than the agent’s.
Where to Go Next
- Axios report → axios.com
- Claude Code: Configure permissions → code.claude.com
- Claude Code: Choose a permission mode → code.claude.com
- Using cloud browser in ChatGPT → help.openai.com
- Grok Bot changelog → x.ai
- Antigravity: Get started → antigravity.google
- Keep Your AI Chats Private: Locked Chats, Share Links and What Never to Paste → Read the story
- Set Up Grok Bot’s Vault Safely: Saved Logins and Cards for Your Bots → Read the story
- Before You Connect a Personal AI Agent: A 10-Minute Privacy Checklist → Read the story
Share this with anyone who has handed an agent the keys this month.


