You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Autonomous mode allows Kilo Code to run in automated environments like CI/CD pipelines without requiring user interaction.
224
-
225
-
```bash
226
-
# Run in autonomous mode with a prompt
227
-
kilocode --auto "Implement feature X"
228
-
229
-
# Run in autonomous mode with piped input
230
-
echo"Fix the bug in app.ts"| kilocode --auto
231
-
232
-
# Run in autonomous mode with timeout (in seconds)
233
-
kilocode --auto "Run tests" --timeout 300
234
-
235
-
# Run in autonomous mode with JSON output for structured parsing
236
-
kilocode --auto --json "Implement feature X"
237
-
```
238
-
239
-
### Autonomous Mode Behavior
240
-
241
-
When running in Autonomous mode (`--auto` flag):
242
-
243
-
1. **No User Interaction**: All approval requests are handled automatically based on configuration
244
-
2. **Auto-Approval/Rejection**: Operations are approved or rejected based on your auto-approval settings
245
-
3. **Follow-up Questions**: Automatically responded with a message instructing the AI to make autonomous decisions
246
-
4. **Automatic Exit**: The CLI exits automatically when the task completes or times out
247
-
248
-
### JSON Output Mode
221
+
## Auto-approval settings
249
222
250
-
Use the `--json` flag with `--auto`to get structured JSON output instead of the default terminal UI. This is useful for programmatic integration and parsing of Kilo Code responses.
223
+
Auto-approval allows the Kilo Code CLI to perform operations without first requiring user confirmation. These settings can either be built up over timein interactive mode, or by editing your config file using `kilocode config` or editing the file directly at `~/.kilocode/config.json`.
251
224
252
-
```bash
253
-
# Standard autonomous mode with terminal UI
254
-
kilocode --auto "Fix the bug"
255
-
256
-
# Autonomous mode with JSON output
257
-
kilocode --auto --json "Fix the bug"
258
-
259
-
# With piped input
260
-
echo"Implement feature X"| kilocode --auto --json
261
-
```
262
-
263
-
**Requirements:**
264
-
265
-
- The `--json` flag requires `--auto` mode to be enabled
266
-
- Output is sent to stdout as structured JSON for easy parsing
267
-
- Ideal for CI/CD pipelines and automated workflows
268
-
269
-
### Auto-Approval Configuration
270
-
271
-
Autonomous mode respects your auto-approval configuration. Edit your config file with `kilocode config` to customize:
225
+
### Default auto-approval settings
272
226
273
227
```json
274
228
{
275
229
"autoApproval": {
276
230
"enabled": true,
277
231
"read": {
278
232
"enabled": true,
279
-
"outside": true
233
+
"outside": false
280
234
},
281
235
"write": {
282
236
"enabled": true,
@@ -359,6 +313,12 @@ The `execute.allowed` and `execute.denied` lists support hierarchical pattern ma
359
313
}
360
314
```
361
315
316
+
## Interactive Mode
317
+
318
+
Interactive mode is the default mode when running Kilo Code without the `--auto` flag, designed to work interactively with a user through the console.
319
+
320
+
In interactive mode Kilo Code will request approval for operations which have not been auto-approved, allowing the user to review and approve operations before they are executed, and optionally add them to the auto-approval list.
321
+
362
322
### Interactive Command Approval
363
323
364
324
When running in interactive mode, command approval requests now show hierarchical options:
@@ -380,6 +340,58 @@ Selecting an "Always run" option will:
380
340
381
341
This allows you to progressively build your auto-approval rules without manually editing the config file.
382
342
343
+
## Autonomous mode (Non-Interactive)
344
+
345
+
Autonomous mode allows Kilo Code to run in automated environments like CI/CD pipelines without requiring user interaction.
346
+
347
+
```bash
348
+
# Run in autonomous mode with a prompt
349
+
kilocode --auto "Implement feature X"
350
+
351
+
# Run in autonomous mode with piped input
352
+
echo"Fix the bug in app.ts"| kilocode --auto
353
+
354
+
# Run in autonomous mode with timeout (in seconds)
355
+
kilocode --auto "Run tests" --timeout 300
356
+
357
+
# Run in autonomous mode with JSON output for structured parsing
358
+
kilocode --auto --json "Implement feature X"
359
+
```
360
+
361
+
### Autonomous Mode Behavior
362
+
363
+
When running in Autonomous mode (`--auto` flag):
364
+
365
+
1. **No User Interaction**: All approval requests are handled automatically based on configuration
366
+
2. **Auto-Approval/Rejection**: Operations are approved or rejected based on your auto-approval settings
367
+
3. **Follow-up Questions**: Automatically responded with a message instructing the AI to make autonomous decisions
368
+
4. **Automatic Exit**: The CLI exits automatically when the task completes or times out
369
+
370
+
### JSON Output Mode
371
+
372
+
Use the `--json` flag with `--auto` to get structured JSON output instead of the default terminal UI. This is useful for programmatic integration and parsing of Kilo Code responses.
373
+
374
+
```bash
375
+
# Standard autonomous mode with terminal UI
376
+
kilocode --auto "Fix the bug"
377
+
378
+
# Autonomous mode with JSON output
379
+
kilocode --auto --json "Fix the bug"
380
+
381
+
# With piped input
382
+
echo"Implement feature X"| kilocode --auto --json
383
+
```
384
+
385
+
**Requirements:**
386
+
387
+
- The `--json` flag requires `--auto` mode to be enabled
388
+
- Output is sent to stdout as structured JSON for easy parsing
389
+
- Ideal for CI/CD pipelines and automated workflows
390
+
391
+
### Auto-Approval in Autonomous Mode
392
+
393
+
Autonomous mode respects your [auto-approval configuration](#auto-approval-settings). Operations which are not auto-approved will not be allowed.
394
+
383
395
### Autonomous Mode Follow-up Questions
384
396
385
397
In Autonomous mode, when the AI asks a follow-up question, it receives this response:
Copy file name to clipboardExpand all lines: apps/kilocode-docs/docs/features/auto-approving-actions.md
+78-31Lines changed: 78 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,22 @@ _Complete settings panel view_
80
80
**Risk level:** Medium
81
81
82
82
While this setting only allows reading files (not modifying them), it could potentially expose sensitive data. Still recommended as a starting point for most users, but be mindful of what files Kilo Code can access.
83
+
84
+
#### Read Outside Workspace
85
+
86
+
**Setting:** "Allow reading files outside the workspace"
87
+
88
+
**Description:** "When enabled, Kilo Code can read files outside the current workspace directory without asking for approval."
89
+
90
+
**Risk level:** Medium-High
91
+
92
+
This setting extends read permissions beyond your project folder. Consider the security implications:
93
+
94
+
- Kilo Code could access sensitive files in your home directory
95
+
- Configuration files, SSH keys, or credentials could be read
96
+
- Only enable if you trust the AI and need it to access external files
97
+
98
+
**Recommendation:** Keep disabled unless you specifically need Kilo Code to read files outside your project.
83
99
:::
84
100
85
101
### Write Operations
@@ -102,25 +118,52 @@ This setting allows Kilo Code to modify your files without confirmation. The del
102
118
- Lower values: Use only when speed is critical and you're in a controlled environment
103
119
- Zero: No delay for diagnostics (not recommended for critical code)
**Setting:** "Allow writing files outside the workspace"
108
124
109
-
_VSCode Problems pane that Kilo Code checks during the write delay_
125
+
**Description:** "When enabled, Kilo Code can create or modify files outside the current workspace directory without asking for approval."
110
126
111
-
When you enable auto-approval for writing files, the delay timer works with VSCode's Problems pane:
127
+
**Risk level:** Very High
112
128
113
-
1. Kilo Code makes a change to your file
114
-
2. VSCode's diagnostic tools analyze the change
115
-
3. The Problems pane updates with any errors or warnings
116
-
4. Kilo Code notices these issues before continuing
129
+
Use with caution and in controlled environments. It allows Kilo Code to:
117
130
118
-
This works like a human developer pausing to check for errors after changing code. You can adjust the delay time based on:
131
+
- Modify your shell configuration files
132
+
- Change system configurations
133
+
- Write to any location your user has access to
119
134
120
-
- Project complexity
121
-
- Language server speed
122
-
- How important error detection is for your workflow
123
-
:::
135
+
**Recommendation:** Keep disabled unless absolutely necessary. Even experienced users should avoid this setting.
136
+
137
+
#### Write to Protected Files
138
+
139
+
**Setting:** "Allow writing to protected files"
140
+
141
+
**Description:** "When enabled, Kilo Code can overwrite or modify files that are normally protected by the `.kilocodeignore` file."
142
+
143
+
**Risk level:** Very High
144
+
145
+
Protected files are intentionally shielded from modification. Enable only if you understand the consequences.
146
+
147
+
### Delete Operations
148
+
149
+
:::danger Delete Operations
150
+
151
+
**Setting:** "Always approve delete operations"
152
+
153
+
**Description:** "Automatically delete files and directories without requiring approval"
154
+
155
+
**Risk level:** Very High
156
+
157
+
This setting allows Kilo Code to permanently remove files without confirmation.
158
+
159
+
**Safeguards:**
160
+
161
+
- Kilo Code still respects `.kilocodeignore` rules
162
+
- Protected files cannot be deleted
163
+
- The delete tool shows what will be removed before execution
164
+
165
+
**Recommendation:** Enable only in isolated environments or when working with temporary/generated files. Always ensure you have backups, checkpoints, or version control.
166
+
:::
124
167
125
168
### Browser Actions
126
169
@@ -153,11 +196,11 @@ Consider the security implications of allowing automated browser access.
153
196
154
197
**Description:** "Automatically retry failed API requests when server returns an error response"
155
198
156
-
**Delay slider:** "Delay before retrying the request" (Default: 5s)
157
-
158
199
**Risk level:** Low
159
200
160
-
This setting automatically retries API calls when they fail. The delay controls how long Kilo Code waits before trying again:
201
+
This setting automatically retries API calls when they fail.
202
+
203
+
The delay controls how long Kilo Code waits before trying again:
161
204
162
205
- Longer delays are gentler on API rate limits
163
206
- Shorter delays give faster recovery from transient errors
@@ -214,23 +257,34 @@ Enables Kilo Code to create and complete subtasks automatically. This relates to
214
257
215
258
**Description:** "Automatically execute allowed terminal commands without requiring approval"
216
259
217
-
**Command management:** "Command prefixes that can be auto-executed when 'Always approve execute operations' is enabled. Add \* to allow all commands (use with caution)."
218
-
219
260
**Risk level:** High
220
261
221
-
This setting allows terminal command execution with controls. While risky, the whitelist feature limits what commands can run. Important security features:
262
+
This setting allows terminal command execution with controls. While risky, the allowlist and denylist features limit what commands can run.
222
263
223
-
-Whitelist specific command prefixes (recommended)
264
+
-Allowlist specific command prefixes (recommended)
224
265
- Never use \* wildcard in production or with sensitive data
225
266
- Consider security implications of each allowed command
267
+
- Consider including potentially dangerous common commands in the deny list
226
268
- Always verify commands that interact with external systems
227
269
270
+
#### Allowed Commands
271
+
272
+
**Setting:** "Command prefixes that can be auto-executed"
273
+
274
+
Add command prefixes (e.g., `git`, `npm`, `ls`) that Kilo Code can run without asking. Use `*` to allow all commands (use with caution).
275
+
228
276
**Interface elements:**
229
277
230
278
- Text field to enter command prefixes (e.g., 'git')
231
279
- "Add" button to add new prefixes
232
280
- Clickable command buttons with X to remove them
233
-
:::
281
+
282
+
#### Denied Commands
283
+
284
+
**Setting:** "Command prefixes that are always blocked"
285
+
286
+
Commands in this list will never run, even if `*` is in the allowed list. Use this to create exceptions for potentially dangerous commands.
287
+
:::
234
288
235
289
### Follow-Up Questions
236
290
@@ -240,9 +294,9 @@ This setting allows terminal command execution with controls. While risky, the w
240
294
241
295
**Description:** Automatically selects the first AI-suggested answer for a follow-up question after a configurable timeout. This speeds up your workflow by letting Kilo Code proceed without manual intervention.
242
296
243
-
**Visual countdown:** When enabled, a countdown timer appears on the first suggestion button, showing the remaining time before auto-selection. The timer is displayed as a circular progress indicator that depletes as time passes.
297
+
**Visual countdown:** When enabled, a countdown timer appears on the first suggestion button in the chat interface, showing the remaining time before auto-selection. The timer displays seconds remaining (e.g., "3s") and counts down in real-time.
244
298
245
-
**Timeout slider:** Use the slider to set the wait time from 1 to 300 seconds (Default: 60s).
299
+
**Timeout slider:** Use the slider to set the wait time (Range: 1-300 seconds, Default: 60s).
246
300
247
301
**Override options:** You can cancel the auto-selection at any time by:
248
302
@@ -277,13 +331,6 @@ This setting allows Kilo Code to automatically update task progress and todo lis
277
331
- Updating task status (pending, in progress, completed)
278
332
- Reorganizing task priorities
279
333
280
-
**Benefits:**
281
-
282
-
- Maintains real-time task progress visibility
283
-
- Reduces interruptions during multi-step workflows
284
-
- Keeps project status accurately reflected
285
-
- Helps track complex task dependencies
286
-
287
334
**Use cases:**
288
335
289
336
- Long-running development sessions
@@ -294,7 +341,7 @@ This setting allows Kilo Code to automatically update task progress and todo lis
294
341
This is particularly useful when combined with the Subtasks permission, as it allows Kilo Code to maintain a complete picture of project progress without constant approval requests.
0 commit comments