Commit beef892
fix: permission system overhaul - bypass mode, smart auto-approve
The permission callback was always showing interactive prompts even in
bypassPermissions mode because we overrode CanUseTool for all modes.
Now the permission logic is:
- bypassPermissions: allow everything, zero prompts
- acceptEdits: auto-approve read-only + Edit/Write/Bash
- plan: allow all (planning can read/analyze)
- default: auto-approve read-only, ask for write operations
Also:
- /permissions bypass (shortcut aliases: bypass, off, y, yes)
- /permissions auto (alias for acceptEdits)
- Clearer mode descriptions with emoji indicators
- Read-only tools (Read, Glob, Grep, WebFetch, WebSearch) never prompt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 19048e9 commit beef892
2 files changed
Lines changed: 72 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
373 | 384 | | |
374 | | - | |
| 385 | + | |
375 | 386 | | |
376 | 387 | | |
377 | 388 | | |
378 | 389 | | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
379 | 402 | | |
380 | 403 | | |
381 | 404 | | |
382 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
383 | 417 | | |
384 | | - | |
| 418 | + | |
385 | 419 | | |
386 | 420 | | |
387 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 214 | + | |
| 215 | + | |
220 | 216 | | |
221 | 217 | | |
222 | 218 | | |
| |||
236 | 232 | | |
237 | 233 | | |
238 | 234 | | |
| 235 | + | |
| 236 | + | |
239 | 237 | | |
240 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
241 | 246 | | |
242 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
243 | 265 | | |
244 | 266 | | |
245 | | - | |
246 | | - | |
247 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
248 | 270 | | |
249 | 271 | | |
250 | | - | |
| 272 | + | |
251 | 273 | | |
252 | 274 | | |
253 | 275 | | |
| |||
256 | 278 | | |
257 | 279 | | |
258 | 280 | | |
259 | | - | |
| 281 | + | |
260 | 282 | | |
261 | 283 | | |
262 | 284 | | |
| |||
0 commit comments