fix(telegram): prevent recovered tool failures from replacing final streamed replies#18909
Closed
JSchwerberg wants to merge 4 commits intoopenclaw:mainfrom
Closed
fix(telegram): prevent recovered tool failures from replacing final streamed replies#18909JSchwerberg wants to merge 4 commits intoopenclaw:mainfrom
JSchwerberg wants to merge 4 commits intoopenclaw:mainfrom
Conversation
22a84c6 to
6f23880
Compare
ea79256 to
b2e9099
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.
Summary
Describe the problem and fix in 2–5 bullets:
exec/bashfailure warnings after successful fallback, and in a specific streamed path the final answer could be dropped whenmessage_endhad tool-call-only content.⚠️ Exec ... failed) or only tool-call artifacts instead of the recovered final answer.exec/bashwarnings, preserved streamed assistant text whenmessage_endhas no text block, and added regressions for both behaviors.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
⚠️ 🛠️ Exec ... failed) can overshadow/mask final assistant reply #18687User-visible / Behavior Changes
exec/bashfailure warnings when fallback succeeds and user-facing streamed output already exists.message_endcontains no text block.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation:Repro + Verification
Environment
Steps
exec/bashfailure and recover via fallback tool.message_endmay include tool-call-only content.Expected
exec/bashfailure warning is suppressed in user-facing output when fallback succeeded.Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm vitest run --config vitest.e2e.config.ts src/agents/pi-embedded-runner/run/payloads.e2e.test.tspnpm vitest run src/telegram/bot-message-dispatch.test.tspnpm vitest run --config vitest.e2e.config.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.does-not-emit-duplicate-block-replies-text.e2e.test.tsexecandbashwarning suppression with streamed user-facing output.message_endcarries no text block.Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoFailure Recovery (if this breaks)
4daa4d6f2,d9c095c7b) and redeploy.src/agents/pi-embedded-runner/run/payloads.tssrc/agents/pi-embedded-subscribe.handlers.messages.tssrc/agents/pi-embedded-subscribe.ts⚠️ Exec/Bash failedreappears before/alongside recovered final answer.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.exec/bashfailures in edge cases.message_endpath.AI Assistance