feat: add clearContext to AfterAgent hooks (#16574)

This commit is contained in:
Jack Wotherspoon
2026-01-23 17:14:30 -05:00
committed by GitHub
parent 5c649d8db1
commit da1664c7a0
8 changed files with 253 additions and 25 deletions

View File

@@ -142,6 +142,8 @@ case is response validation and automatic retries.
- `reason`: Required if denied. This text is sent **to the agent as a new
prompt** to request a correction.
- `continue`: Set to `false` to **stop the session** without retrying.
- `clearContext`: If `true`, clears conversation history (LLM memory) while
preserving UI display.
- **Exit Code 2 (Retry)**: Rejects the response and triggers an automatic retry
turn using `stderr` as the feedback prompt.