Skip to content

fix(tools): enforce returning Command object in writeTodos for graph state updates#15

Merged
Palash Shah (Palashio) merged 1 commit intolangchain-ai:mainfrom
bianbianzhu:fix/add-the-missing-command-object-in-write-todos-tool
Aug 22, 2025
Merged

fix(tools): enforce returning Command object in writeTodos for graph state updates#15
Palash Shah (Palashio) merged 1 commit intolangchain-ai:mainfrom
bianbianzhu:fix/add-the-missing-command-object-in-write-todos-tool

Conversation

@bianbianzhu
Copy link
Contributor

This PR addresses the inconsistency in the writeTodos tool implementation, which currently returns a plain object rather than the documented Command object.

Please refer #14 for more information.

@Palashio
Copy link
Collaborator

hey! taking a look at this, thank you!

@Palashio Palash Shah (Palashio) merged commit 5a551eb into langchain-ai:main Aug 22, 2025
9 checks passed
Christian Bromann (christian-bromann) added a commit that referenced this pull request Feb 2, 2026
When two tools are called in parallel and one is interrupted via
interruptOn, rejecting the interrupt would leave a dangling tool_call_id,
causing the provider to throw a 400 error.

The root cause was middleware ordering: createPatchToolCallsMiddleware
ran before humanInTheLoopMiddleware, so the dangling tool call patch
could be overwritten when HITL processed the reject decision.

Fix by moving createPatchToolCallsMiddleware to run after
humanInTheLoopMiddleware, ensuring it can properly patch any remaining
dangling tool calls after HITL has processed resume decisions.

Fixes #15
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.

2 participants