Repository navigation
fix: isolate RunState checkpoint tool decisions - #4413
Conversation
|
Thanks for landing the follow-up. I ran the merged commit Good news: the original sibling-isolation scenario now passes all seven recorded invariants in both That is a real FAIL → PASS relative to The same verification found one recursive boundary that appears not to be covered by #4413. With a protected approval nested through
The minimal sequence is: paused = await Runner.run(outer_agent, "start")
state = paused.to_state()
state.approve(state.get_interruptions()[0])
resumed = await Runner.run(outer_agent, state)At two or more agent-tool edges, So the top-level checkpoint isolation fix is working; the remaining gap is recursive ownership/routing of that approved interruption. I will avoid opening a competing PR. I can provide the focused 2/3-edge regression or validate a follow-up immediately. I am also preparing a content-addressed before/after record so the result is independently checkable; the published 0.20.0 counterexample is in AgentRunProof v0.1.1. |
This pull request fixes approval and invocation ledger sharing between
RunStatecheckpoints created from the same interrupted result.RunResult.to_state()andRunResultStreaming.to_state()now detach SDK-owned approval state while preserving caller context and Agent identity. Nested Agent-as-tool approval checkpoints receive scope-qualified, recursively rebound state so approving or rejecting one checkpoint cannot affect another checkpoint or leave stale nested cache entries behind.The change adds regression coverage for direct checkpoint isolation, streamed results, nested approval ownership, and scope-qualified agent-tool cache entries.
ref: #4409 (comment)