Remove duplicate turn_state.load() from AgentApplication._initialize_state() - #455
Merged
Rodrigo Brandão (rodrigobr-msft) merged 2 commits intoJul 9, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR resolves issue #454 by removing a redundant asynchronous turn_state.load(...) call during AgentApplication._initialize_state() when the default TurnState factory is used, simplifying state initialization while preserving the single required load.
Changes:
- Removed the extra
await turn_state.load(context, self._options.storage)from the default-factory branch in_initialize_state(). - Kept the single, shared “Loading turn state from storage” load so both custom and default turn state factories follow the same load path.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rodrigo Brandão (rodrigobr-msft)
enabled auto-merge (squash)
July 9, 2026 21:03
Rodrigo Brandão (rodrigobr-msft)
approved these changes
Jul 9, 2026
Rodrigo Brandão (rodrigobr-msft)
deleted the
users/kylerohn/duplicate-state-loading
branch
July 9, 2026 21:04
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.
Closes #454
This pull request makes a small change to the
agent_application.pyfile by removing an unnecessary call to asynchronously load the turn state when using the default turn state factory. This helps simplify the initialization process.