fix(runtime): preserve Plan final responses - #3886
Open
Sun-GLiang wants to merge 1 commit into
Open
Conversation
M4n5ter
force-pushed
the
fix/3884-plan-final-response
branch
2 times, most recently
from
August 26, 2026 09:44
14d2fc0 to
13157af
Compare
Treat completed and cancelled Plan executions as tool boundaries so the model can consume the durable result and produce its final response. Keep SubmitPlan as the explicit approval handoff. Generated-by: Maka
M4n5ter
force-pushed
the
fix/3884-plan-final-response
branch
from
August 26, 2026 09:51
13157af to
080ef8c
Compare
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.
Plan execution completion is a tool boundary, not a conversational terminal. Stop setting the agent-loop stop flag for completed and cancelled Plan executions so the model can consume the durable result and produce a final response.
Keep
SubmitPlanas the explicit one-stepplan_handoff, and cover completion, cancellation, and submission boundaries with provider-loop regressions.Fixes #3884
Verification
npm --workspace @maka/runtime run typechecknpm --workspace @maka/runtime run buildnode --test packages/runtime/dist/__tests__/ai-sdk-backend.test.js— 202/202 passednpx biome check packages/runtime/src/ai-sdk-backend.ts packages/runtime/src/__tests__/ai-sdk-backend.test.tsgit diff --checkAI use
Select exactly one:
Tool(s) and scope: Maka investigated the Runtime Plan terminal path, implemented the loop-boundary change, and authored the regression coverage and PR text. The commit includes a
Generated-by: Makatrailer.Checklist
Does this PR entail a change in behavior?