Skip to content

fix(code): remove undispatched SessionEndCause members - #5240

Merged
Alexander Olsen (aolsenjazz) merged 1 commit into
mainfrom
aolsenjazz/code/remove-undispatched-session-end-causes
Aug 3, 2026
Merged

fix(code): remove undispatched SessionEndCause members#5240
Alexander Olsen (aolsenjazz) merged 1 commit into
mainfrom
aolsenjazz/code/remove-undispatched-session-end-causes

Conversation

@aolsenjazz

Copy link
Copy Markdown
Contributor

Session-end hooks now expose only causes with real lifecycle dispatch sites.


Removes the two unreachable SessionEndCause members, retargets matcher/projection coverage to clear, and documents every valid end cause.

Test plan
  • make lint (passed)
  • make test TEST_FILE=tests/unit_tests/hooks/test_engine.py (61 passed)
  • make test (11,647 passed; 24 environment-sensitive failures outside hooks)

Made by Open SWE

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@github-actions github-actions Bot added dcode Related to `deepagents-code` fix A bug fix (PATCH) internal User is a member of the `langchain-ai` GitHub organization size: XS < 50 LOC labels Aug 2, 2026
@mdrxy Mason Daugherty (mdrxy) changed the title fix(code): remove undispatched SessionEndCause members fix(code): remove undispatched SessionEndCause members Aug 3, 2026
@johannes117
Johannes du Plessis (johannes117) marked this pull request as ready for review August 3, 2026 22:22

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Open SWE Review: No issues found

Open SWE reviewed this PR and found no potential bugs to report.

Open in WebView Open SWE trace

@aolsenjazz
Alexander Olsen (aolsenjazz) merged commit ee1e0f5 into main Aug 3, 2026
76 checks passed
@aolsenjazz
Alexander Olsen (aolsenjazz) deleted the aolsenjazz/code/remove-undispatched-session-end-causes branch August 3, 2026 22:27
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dcode Related to `deepagents-code` fix A bug fix (PATCH) internal User is a member of the `langchain-ai` GitHub organization size: XS < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants