Repository navigation
Conversation
Contributor
Author
|
The evaluation from #9495 on this branch, against
The same cases pass and fail on both: the docs question, a change the user makes between two prompts, and the user's own execution are what later sub-issues of #9453 address. Most of each call is still the system prompt, which #9456 and #9481 shrink. |
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9494 +/- ##
============================================
- Coverage 91.57% 91.56% -0.02%
Complexity 5159 5159
============================================
Files 1300 1300
Lines 58092 58019 -73
Branches 7615 7615
============================================
- Hits 53198 53125 -73
Misses 2958 2958
Partials 1936 1936
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Before every model call, the agent dropped the SDK's messages and wrote one user message: a summary of the conversation followed by the current dataflow. A past tool call appeared as its name, its summary and the first line of its result. Each step now keeps the model messages it added: the user's message, or the assistant message with its tool calls and the tool results. The model reads these along the path to HEAD, so a branch HEAD has left stays out of sight. The current dataflow is one message at the end of every step's input, written again each time and never kept. The loop runs as the SDK's ToolLoopAgent, and the system prompt describes only the dataflow block. A tool call the SDK did not run, because its response was cut off, is kept with a failed result: the SDK refuses a conversation in which a call has no result, so every later turn would fail.
bobbai00
force-pushed
the
feat/agent-native-messages
branch
from
November 19, 2026 08:38
9ff9816 to
bea6728
Compare
Contributor
Author
This branch has not been deployed
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.
What changes were proposed in this PR?
Before every model call, the agent dropped the AI SDK's messages and wrote one user message in their place: a summary of the conversation, then the current dataflow. This PR keeps the conversation as the SDK's own messages.
maingenerateTextwithonStepFinish, an alias AI SDK 7 deprecatesToolLoopAgentwithonStepEndEach step keeps the messages it added, and the model reads them along the path to HEAD, so a branch HEAD has left stays out of sight as before. A stopped or failed turn ends with the note the chat already shows ("Generation stopped by user.", "Error: ..."), so the next turn knows. The chat looks the same; only its step details change, since they list what the model received:
mainAny related issues, documentation, discussions?
Closes #9455
Part of #9453
How was this PR tested?
cd agent-service && bun test(341 pass),bun run typecheckandbun run format:check. The new tests check, with the SDK's mock model, the exact input of each call: a tool call and its whole result reach the next step, the dataflow block is last and appears once, a second turn reads the first as it happened, an abandoned branch stays out, a stopped or failed turn is part of the next turn's history, andclearHistoryleaves nothing behind.End to end with Claude Haiku 5.5 through LiteLLM, on a single-node stack of today's images with this branch's agent-service and the Angular app. Three prompts on the Iris example dataset (load and count it, the species with the largest average petal length, then add the average sepal length) on
mainand on this branch:mainA turn stopped after its first step, followed by "Go on: finish what I asked before", continued from the stopped turn's tool result and added only the missing operator.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5.5