canUseTool callback.
You choose a permission mode, and the bot enforces it — from silent
denial of unapproved tools all the way to full bypass.
Permission modes
Switch modes with the/permissions slash command. The mode is
fork-scoped: changing it inside an interactive fork does not affect
the main session, and vice versa.
| Mode | Behavior |
|---|---|
dontAsk | Silent denial of tools not in the session-allowed set. No prompt. Default. |
default | Discord message with reaction buttons for each tool use. |
acceptEdits | SDK built-in — file-edit tools auto-approved, others prompt. |
bypassPermissions | SDK built-in — all tools auto-approved, no prompts. |
dontAsk is ollim-bot’s own layer. Under the hood, the SDK permission
mode stays at default — the bot’s canUseTool callback handles the
silent denial before the SDK ever sees it.Approval flow
Indefault mode, unapproved tool use triggers an interactive approval
prompt in your Discord DM. (acceptEdits auto-approves file-edit tools
at the SDK level, and bypassPermissions approves everything at the SDK
level — neither mode triggers the interactive flow below.)
Bot sends an approval message
A message appears in your DM showing the tool label
(name + arguments). Three emoji reactions are added automatically.
You react
React with one of the three emojis to respond:
| Reaction | Effect |
|---|---|
| ✅ | Allow — approve this single tool use |
| ❌ | Deny — reject this tool use |
| 🔓 | Always — approve and add the tool to the session-allowed set |
timed out.
Session-allowed set
When you react with 🔓 (Always), the tool is added to a session-allowed set. Future uses of that tool are auto-approved without prompting — even indontAsk mode.
- The session-allowed set is shared across the main session and interactive forks.
/clearresets the session-allowed set (and cancels any pending approvals).- The set is in-memory only — it does not persist across bot restarts.
Background forks
Background forks always deny tool permission requests, regardless of the current mode. The agent in a background fork cannot trigger approval prompts. Tools available to background forks are controlled separately throughallowed_tools and disallowed_tools in the fork’s YAML
configuration — see Background forks for
details.
Cancellation
Pending approval prompts are automatically cancelled (treated as denials) when any of the following occur:- You use
/clear— resets the session-allowed set and cancels all pending approvals - You interrupt the agent — cancels pending approvals for the current turn
- You exit an interactive fork — cancels any approvals pending inside the fork
cancelled with strikethrough text.
Examples
- dontAsk (default)
- default (interactive)
- bypassPermissions
In This is the default. The agent operates autonomously within its
allowed toolset without interrupting you for approvals.
dontAsk mode, any tool not in the session-allowed set is silently
denied — no message appears.Next steps
Slash commands
Full reference for all slash commands including
/permissions.Forks
How interactive and background forks interact with permission scoping.
MCP tools
Reference for all MCP tools the agent can use.
Background forks
Tool restrictions and allowed/disallowed tool configuration for background forks.
