Repository navigation
feat(session)!: deprecate the message-log session managers - #4832
Closed
nicolas-m-romero wants to merge 2 commits into
Closed
nicolas-m-romero wants to merge 2 commits into
nicolas-m-romero wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
1 of 4 tasks
nicolas-m-romero
force-pushed
the
agent-tasks/3664-deprecate-message-log-managers
branch
from
October 6, 2026 14:43
2ae090e to
ff78869
Compare
Apply @deprecated (typing_extensions) to FileSessionManager, S3SessionManager, and RepositorySessionManager, directing users to SnapshotSessionManager with the matching Storage backend and linking the migration guide. Message names the removal version (v2.0.0) per team/FEATURE_LIFECYCLE.md, and the classes remain fully functional until then. Adds one deprecation-warning test per manager (mirrors the LlamaAPIModel pattern). Existing functional tests continue to construct the managers and now emit a DeprecationWarning; the suite has no filterwarnings=error so they pass. Gated follow-up to the migration docs (#4797). Depends on the migration guide landing so the @deprecated link resolves. Toward #3664.
nicolas-m-romero
force-pushed
the
agent-tasks/3664-deprecate-message-log-managers
branch
from
October 6, 2026 14:53
ff78869 to
992a779
Compare
1 of 4 tasks
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.
Summary
Applies the
@deprecateddecorator (fromtyping_extensions, perteam/FEATURE_LIFECYCLE.md) to the three Python message-log session managers, steering users toSnapshotSessionManager:FileSessionManager→SnapshotSessionManager+LocalFileStorageS3SessionManager→SnapshotSessionManager+S3StorageRepositorySessionManager→SnapshotSessionManager+ a customStoragebackendEach message names the removal version (v2.0.0), the replacement, and links the migration guide:
https://strandsagents.com/docs/user-guide/sdk/agents/session-management/#migrating-from-the-message-log-session-managersThe classes remain fully functional until removal — this only adds the warning + type-checker/IDE signal.
Why now / the gate
The migration gate in #3664 required: multi-agent snapshot support (done, #3662), BidiAgent support (done, #4603), and a migration path (#3663, now a documented procedure in #4797). With those in place the legacy managers can be deprecated.
Implementation notes
@deprecatedwith a literal), matching theLlamaAPIModel/make_bashprecedents.RepositorySessionManagerand its subclasses does not double-warn on instantiation: instantiating a subclass emits only its own message (verified). The base decorator fires once at subclass-definition (import) time, which marks the base for type checkers.pytest.warns(DeprecationWarning, ...)), mirroringtest__init__emits_deprecation_warningforLlamaAPIModel.DeprecationWarning; there is nofilterwarnings=error, so the suite stays green.Testing
ruff checkon the three source files: clean.Toward #3664.
Depends on #4797 (migration guide the deprecation message links).