Commit 2bc55f2
fix(agent): prompt for destructive PostHog exec sub-tools in auto mode
Auto mode only promises hands-off file edits and shell commands, but the PostHog exec destructive gate short-circuited to silent allow in auto mode, so update/delete/destroy sub-tools were the only exec calls that never produced a permission_request. Non-destructive exec calls already prompt in auto mode (and web clients auto-approve them client-side), which made the gate exactly backwards on the cloud surface: safe calls asked, destructive ones ran silently.
Keep the bypass for bypassPermissions only; persisted allow_always sub-tool approvals still skip the prompt.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 9beff6e commit 2bc55f2
2 files changed
Lines changed: 18 additions & 7 deletions
File tree
- packages/agent/src/adapters/claude/permissions
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
| 224 | + | |
| 225 | + | |
221 | 226 | | |
222 | | - | |
223 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
224 | 235 | | |
225 | 236 | | |
226 | 237 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
| |||
0 commit comments