Problem
Currently only tw thread delete requires the --yes flag before executing. All other destructive and state-changing commands execute immediately without confirmation.
Commands that execute without --yes today:
Deletes (irreversible):
tw msg delete — permanently deletes a conversation message
tw comment delete — permanently deletes a thread comment
Archive/state changes:
tw thread done — archives a thread
tw conversation done — archives a conversation
Why this matters
From the 7 Principles for Agent-Friendly CLIs, Principle 4 (Safe Retries and Explicit Mutation Boundaries):
Agents retry, resume, and replay commands more frequently than humans. Dangerous mutations require explicit flags.
Agents operating in retry loops won't notice if a delete ran twice — and for archive operations, because they're idempotent (archiving an already-archived item is a no-op), an agent won't get an error signal that it already ran. The --yes flag acts as an explicit acknowledgement that the agent intended the mutation.
The existing thread delete implementation is the reference pattern:
- Without
--yes: shows what would happen and exits (non-destructive preview)
- With
--json but without --yes: errors with "--yes is required to execute deletion in --json mode"
- With
--yes: executes the operation
Scope
All of the following should follow the thread delete pattern:
| Command |
Type |
Currently requires --yes |
tw thread delete |
Delete |
✅ Yes |
tw msg delete |
Delete |
❌ No |
tw comment delete |
Delete |
❌ No |
tw thread done |
Archive |
❌ No |
tw conversation done |
Archive |
❌ No |
Problem
Currently only
tw thread deleterequires the--yesflag before executing. All other destructive and state-changing commands execute immediately without confirmation.Commands that execute without
--yestoday:Deletes (irreversible):
tw msg delete— permanently deletes a conversation messagetw comment delete— permanently deletes a thread commentArchive/state changes:
tw thread done— archives a threadtw conversation done— archives a conversationWhy this matters
From the 7 Principles for Agent-Friendly CLIs, Principle 4 (Safe Retries and Explicit Mutation Boundaries):
Agents operating in retry loops won't notice if a delete ran twice — and for archive operations, because they're idempotent (archiving an already-archived item is a no-op), an agent won't get an error signal that it already ran. The
--yesflag acts as an explicit acknowledgement that the agent intended the mutation.The existing
thread deleteimplementation is the reference pattern:--yes: shows what would happen and exits (non-destructive preview)--jsonbut without--yes: errors with"--yes is required to execute deletion in --json mode"--yes: executes the operationScope
All of the following should follow the
thread deletepattern:--yestw thread deletetw msg deletetw comment deletetw thread donetw conversation done