Skip to content

fix #2151 shield server-managed handoffs from unsupported history rewrites#2747

Open
seratch wants to merge 1 commit intomainfrom
fix/server-managed-handoff-shield
Open

fix #2151 shield server-managed handoffs from unsupported history rewrites#2747
seratch wants to merge 1 commit intomainfrom
fix/server-managed-handoff-shield

Conversation

@seratch
Copy link
Member

@seratch seratch commented Mar 21, 2026

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_history no 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nest handoff: Handoff is incompatible with server-managed conversation

1 participant