Skip to content

fix(func): preserve nested entrypoint interrupt resume behavior#7088

Open
Giulio Leone (giulio-leone) wants to merge 2 commits intolangchain-ai:mainfrom
giulio-leone:fix/subgraph-resume-reuse-6792
Open

fix(func): preserve nested entrypoint interrupt resume behavior#7088
Giulio Leone (giulio-leone) wants to merge 2 commits intolangchain-ai:mainfrom
giulio-leone:fix/subgraph-resume-reuse-6792

Conversation

@giulio-leone

Summary

  • treat checkpoint_id=None as an unpinned nested resume so completed child tasks are reused
  • avoid surfacing duplicate bubbled GraphInterrupt payloads from nested call futures
  • add sync and async regressions for nested entrypoint -> entrypoint interrupt/resume behavior

Testing

  • NO_DOCKER=true uv run --python 3.12 pytest tests/test_pregel.py -k "nested_entrypoint_interrupt_resume_reuses_tasks or multiple_subgraphs_mixed_entrypoint" -q
  • NO_DOCKER=true uv run --python 3.12 pytest tests/test_pregel_async.py -k "nested_entrypoint_interrupt_resume_reuses_tasks or multiple_subgraphs_mixed_entrypoint" -q
  • uv run --python 3.12 python ... (raw issue reproducer now surfaces one interrupt and resumes to foo bar baz qux)

Fixes #6792

@giulio-leone
Copy link
Author

Friendly ping — I reproduced the reported nested-entrypoint interrupt/resume bug, validated the fix on the available local backends, and the branch is current. Ready for review whenever convenient; happy to address any feedback. 🙏

@sydney-runkle
Copy link
Collaborator

Hi! I think now out of date w/ main, could you please rerun w/ the new changes? I think my diff might cover this use case...

Thanks for the contribution!

giulio-leone and others added 2 commits March 10, 2026 05:19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@giulio-leone
Copy link
Author

Rebased this branch onto current main and adapted the nested resume fix to the newer replay semantics (checkpoint_id=None should behave as an unpinned resume, not as replay).

Validation on top of current main:

  • NO_DOCKER=true uv run --python 3.12 pytest tests/test_pregel.py -k "nested_entrypoint_interrupt_resume_reuses_tasks or multiple_subgraphs_mixed_entrypoint" -q
  • NO_DOCKER=true uv run --python 3.12 pytest tests/test_pregel_async.py -k "nested_entrypoint_interrupt_resume_reuses_tasks or multiple_subgraphs_mixed_entrypoint" -q
  • git diff --check

Results:

  • sync target: 6 passed
  • async target: 4 passed

This should clear the staleness introduced by the 15 commits that landed on main after the original PR was opened.

@giulio-leone Giulio Leone (giulio-leone) force-pushed the fix/subgraph-resume-reuse-6792 branch from a904c0b to 442d441 Compare March 10, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resuming after interrupt doesn't reuse prior task outputs when interrupt is in subgraph

2 participants