fix #2151 shield server-managed handoffs from unsupported history rewrites#2747
Open
fix #2151 shield server-managed handoffs from unsupported history rewrites#2747
Conversation
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.
This pull request resolves #2151 by preserving the working handoff path under server-managed continuation instead of failing fast across the board.
#2746 correctly identifies that server-managed conversations cannot safely support local history rewrites, but it rejects both handoff input filters and nested handoff history. In practice, those two cases are not equally risky. Explicit handoff input filters can silently widen or reshape the receiving agent's context, so this change keeps them as a hard
UserError. Nested handoff history, however, can degrade safely to the existing delta-only handoff path that server-managed continuation already supports.As a result, users who opt into
nest_handoff_historyno longer get blocked by a hard error when a safe fallback exists. Server-managed runs continue to hand off successfully, emit a warning that nested history was disabled, and stay aligned with the server-owned transcript. This keeps the strict safety boundary from #2746 where it matters, while avoiding an unnecessary UX regression for the common nested-handoff case.The implementation applies that policy after run-level defaults and per-handoff overrides are merged, and adds regression coverage for non-streamed and streamed runs across both run-level and per-handoff settings.