feat(code): make Hooks v2 generally available - #5307
Merged
Johannes du Plessis (johannes117) merged 1 commit intoAug 4, 2026
Conversation
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Johannes du Plessis (johannes117)
marked this pull request as ready for review
August 4, 2026 17:19
Alexander Olsen (aolsenjazz)
approved these changes
Aug 4, 2026
Johannes du Plessis (johannes117)
deleted the
johannes117/code/hooks-v2-ga
branch
August 4, 2026 17:30
Johannes du Plessis (johannes117)
pushed a commit
that referenced
this pull request
Aug 4, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Release notes preview: keep this section in sync with the package `CHANGELOG.md`. Publish reads the merged CHANGELOG via `release.yml`, not this PR description — keep them aligned anyway so the PR stays an accurate historical record for reviewers and anyone returning later._ --- ## [0.1.52](deepagents-code==0.1.51...deepagents-code==0.1.52) (2026-08-04) ### Features - Hooks v2 is now generally available, with support for loading hooks from installed plugins. ([#5307](#5307), [#5198](#5198)) - Auto approval classifier configuration now supports selecting the classifier model and setting a review timeout. ([#5205](#5205), [#5302](#5302)) - HITL rejection reasons are now framed for the model, and the approval menu makes reject-with-feedback easier to discover. ([#5259](#5259), [#5260](#5260)) - Added a tri-state `DEEPAGENTS_CODE_ONBOARDING` environment variable. ([#5301](#5301)) - The `/model` footer Ctrl+N hint now follows the current display mode. ([#5247](#5247)) - The price catalog now refreshes hourly in the background. ([#5264](#5264)) - Updated recommendations to include DeepSeek V4 Flash 0731. ([#5244](#5244)) ### Bug Fixes - Fixed several Hooks v2 lifecycle issues: session-end teardown is now bounded, hooks refresh after cwd switches, malformed hook resumes are handled, hook stops surface without agent errors, and unused `SessionEndCause` members were removed. ([#5248](#5248), [#5249](#5249), [#5233](#5233), [#5276](#5276), [#5240](#5240)) - `PreCompact` now fires before auto-compaction. ([#5277](#5277)) _End release notes preview._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: langchain-oss-automated-triage[bot] <248757908+langchain-oss-automated-triage[bot]@users.noreply.github.com>
Alexander Olsen (aolsenjazz)
added a commit
that referenced
this pull request
Aug 7, 2026
Post-execution hooks no longer replay tools when resumed, preventing duplicate side effects in all Hooks v2 sessions. --- `PostToolUse`, `PostToolUseFailure`, and `SubagentStop` previously interrupted inside the tools node after execution but before its result committed. This moves those interrupts to a checkpoint-safe post-tools boundary while preserving duration reporting and result feedback/context rewriting through private state. Hooks v2 has loaded by default since #5307, so the fix applies regardless of `DEEPAGENTS_CODE_EXPERIMENTAL`. <details> <summary>Test plan</summary> - `make lint` - `uv run --group test pytest -q tests/unit_tests/hooks` (220 passed) </details> Made by [Open SWE](https://openswe.vercel.app/agents/d820d546-4257-bc9f-82ee-3a038ddc0005) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> Co-authored-by: Alexander <aolsenjazz@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hooks v2 now loads by default across interactive and headless sessions.
Removes the runtime, trust, cwd-switch, and main/subagent server middleware experimental gates while preserving workspace trust and configured-event runtime gating.
Made by Open SWE