Repository navigation
fix: [Agent] A simple agent—configured with a "chat history" setting of 2 turns—fails to access prior context; the large language model responds as if the conversation is just beginning ("This is the start of the conversation"). #7799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues / potential problems
Unused local variable
dialogue_number = application.dialogue_numberis added but never used.application.dialogue_numberdirectly:Possible
AttributeErrorfor legacy / versioned objectsapplication.dialogue_numberis accessed three times. If not allApplication/ApplicationVersionrecords have this field,build_workflowcan fail.Noneis not valid for the workflow schema, define an explicit default or skip assignment.Published-version snapshot consistency
dialogue_numberis part of theApplicationVersionsnapshot. If it is not versioned, published workflows may use a changing/current value or fail depending on the model.ApplicationandApplicationVersion.Workflow schema compatibility
dialogue_numberis a supported property for thenode_dataof nodes5and10.Duplication and hard-coded node indices
mcp_servers,application_ids, andtool_ids.data["nodes"][5]/[10]is fragile if node order changes. If the workflow format allows it, resolve nodes by ID/type instead of index.Suggested cleanup
Tests to add
Applicationwith validdialogue_numberApplicationVersionwith validdialogue_numberNonedialogue_number5and10Overall: the main immediate issue is the unused local variable and repeated direct attribute access. The main longer-term risk is whether
dialogue_numberis guaranteed, versioned, and schema-compatible for both application types.