Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/cli/tool-permissions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,23 @@ Every tool has one of three permission levels:

## Defaults

Read-only tools (`Read`, `List`, `Search`, `Fetch`, `Diff`) default to `allow`. Write tools (`Edit`, `MultiEdit`, `Write`) and `Bash` default to `ask`. In [headless mode](/cli/headless-mode), `ask` tools are excluded since there's no one to approve them.
Read-only tools (`Read`, `List`, `Search`, `Fetch`, `Diff`, `AskQuestion`, `Checklist`, `Status`, `CheckBackgroundJob`, `ReportFailure`, `UploadArtifact`) default to `allow`. Write tools (`Edit`, `MultiEdit`, `Write`) and `Bash` default to `ask`. In [headless mode](/cli/headless-mode), `ask` tools are excluded since there's no one to approve them.

## AskQuestion tool

`AskQuestion` is a built-in read-only tool that lets the agent pause and ask for clarification before continuing.

### Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `question` | `string` | Yes | The prompt shown to the user |
| `options` | `string[]` | Yes | Suggested choices; use an empty array for free-form input |
| `defaultAnswer` | `string` | No | Used when the user submits without typing a response |

### Permission behavior

`AskQuestion` is `allow` by default in normal, plan, and auto modes. It does not modify files or run commands.

## Overriding with flags

Expand Down
13 changes: 12 additions & 1 deletion docs/cli/tui-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ cn --resume

This restores the full conversation history, so the agent remembers prior context.

## Interactive questions in TUI mode

The agent can use the `AskQuestion` tool to gather clarifications before it continues. You will see a quiz-style prompt directly in the terminal.

- Use <kbd>↑</kbd>/<kbd>↓</kbd> to highlight an option
- Press <kbd>Enter</kbd> to submit the highlighted option
- Start typing to send a custom answer (even when options are shown)
- If a default answer is provided, pressing <kbd>Enter</kbd> on an empty input submits that default

This is useful when the agent needs decisions like scope, preferences, or environment details before making edits.

## Tool Permissions

Tools that can modify your system (file writes, terminal commands) prompt for approval before executing. You get three options:
Expand All @@ -57,4 +68,4 @@ Tools that can modify your system (file writes, terminal commands) prompt for ap
- **Continue + don't ask again** — approve and save a policy rule to `~/.continue/permissions.yaml`
- **No** — reject the call and give the agent new instructions

Read-only tools (`Read`, `List`, `Search`, `Fetch`) run automatically. See [tool permissions](/cli/tool-permissions) for the full policy system.
Read-only tools (`Read`, `List`, `Search`, `Fetch`, `Diff`, `AskQuestion`) run automatically. See [tool permissions](/cli/tool-permissions) for the full policy system.
Loading