Skip to content

Commit 1c3b0b3

Browse files
author
Peter Steinberger
committed
docs(commitments): explain dismissal JSON results
1 parent d6370a9 commit 1c3b0b3

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

‎docs/cli/commitments.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,32 @@ and one row per commitment:
8686
JSON output includes the count, the active status and agent filters, the
8787
shared SQLite database path, and the full stored records.
8888

89+
### Dismissal output
90+
91+
`dismiss` changes only active `pending` or `snoozed` commitments. Missing,
92+
already dismissed, sent, and expired commitments remain unchanged. Duplicate
93+
IDs are ignored after their first occurrence, and results preserve request order.
94+
95+
When every requested commitment is dismissed, `--json` returns:
96+
97+
```json
98+
{ "dismissed": ["cm_abc123", "cm_def456"] }
99+
```
100+
101+
When a request includes stale or inactive IDs, the command reports both results
102+
and exits with status `1`:
103+
104+
```json
105+
{ "dismissed": ["cm_abc123"], "notDismissed": ["cm_missing", "cm_expired"] }
106+
```
107+
108+
If no requested commitment can be dismissed, the command still exits with status
109+
`1`:
110+
111+
```json
112+
{ "dismissed": [], "notDismissed": ["cm_missing"] }
113+
```
114+
89115
## Related
90116

91117
- [Inferred commitments](/concepts/commitments)

0 commit comments

Comments
 (0)