Skip to content

fix(runtime): preserve Plan final responses - #3886

Open
Sun-GLiang wants to merge 1 commit into
apache:mainfrom
Sun-GLiang:fix/3884-plan-final-response
Open

fix(runtime): preserve Plan final responses#3886
Sun-GLiang wants to merge 1 commit into
apache:mainfrom
Sun-GLiang:fix/3884-plan-final-response

Conversation

@Sun-GLiang

Copy link
Copy Markdown
Contributor

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 SubmitPlan as the explicit one-step plan_handoff, and cover completion, cancellation, and submission boundaries with provider-loop regressions.

Fixes #3884

Verification

  • npm --workspace @maka/runtime run typecheck
  • npm --workspace @maka/runtime run build
  • node --test packages/runtime/dist/__tests__/ai-sdk-backend.test.js — 202/202 passed
  • npx biome check packages/runtime/src/ai-sdk-backend.ts packages/runtime/src/__tests__/ai-sdk-backend.test.ts
  • git diff --check

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

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: Maka trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — completed or cancelled Plan executions now allow the model's final response; Plan submission still hands off for approval
  • No

@M4n5ter
M4n5ter force-pushed the fix/3884-plan-final-response branch 2 times, most recently from 14d2fc0 to 13157af Compare August 26, 2026 09:44
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
M4n5ter force-pushed the fix/3884-plan-final-response branch from 13157af to 080ef8c Compare August 26, 2026 09:51
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(runtime): Plan execution completes without a final assistant response

1 participant