Skip to content

Conversation

@Fangziyang0910
Copy link

Root cause

approval node both returned Command(goto=...) and had static edges to proceed/cancel, causing concurrent writes to status in the same step.

Fix

Removed the two static edges and rely solely on goto for routing.

Cleanup

Removed unused sqlite3 import.

Result

Resume now succeeds and status is set exactly once.

Overview

Fix InvalidUpdateError in interrupts example by removing conflicting edges and relying on Command(goto=...) for routing. This prevents concurrent writes to status in the same step and makes the resume flow deterministic.

Type of change

Type: Fix bug

Related issues/PRs

  • GitHub issue: N/A
  • Feature PR: N/A
  • Linear issue: N/A
  • Slack thread: N/A

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev (example runs without error)
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links (N/A)
  • I have updated navigation in src/docs.json if needed (N/A)
  • I have gotten approval from the relevant reviewers (self/maintainer approval for example fix)
  • (Internal team members only / optional) I have created a preview deployment using the Create Preview Branch workflow

Additional notes

  • Error reference: “INVALID_CONCURRENT_GRAPH_UPDATE” — multiple writes to the same state key in one step.
  • The example now uses a single, unambiguous route via goto, avoiding parallel writes.

…ean up imports

Root cause: approval node both returned Command(goto=...) and had static edges to proceed/cancel, causing concurrent writes to status in the same step.
Fix: Removed the two static edges and rely solely on goto for routing.
Cleanup: Removed unused sqlite3 import.
Result: Resume now succeeds and status is set exactly once.
Copilot AI review requested due to automatic review settings November 3, 2025 09:11
@github-actions github-actions bot added langgraph For docs changes to LangGraph oss labels Nov 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes unnecessary code from a Python example in the interrupts documentation. The changes clean up unused imports and redundant edge definitions that are not needed given the routing logic.

  • Removes unused sqlite3 import
  • Removes redundant static edges from "approval" node that are superseded by dynamic Command routing

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

Labels

langgraph For docs changes to LangGraph oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant