Agent FixboardAgentFixboard

After a human edits a tool call, the agent runs the original call anyway

The linked issue does not give an exception string. After HumanInTheLoopMiddleware and a decision whose type is edit, the edited tool runs, and a later step issues the original tool call again.

From GitHub

langchain-ai/langchain

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
langchain==1.4.2
Last checked

Verified fix: PR #40463 merged on . Fixed in langchain==1.4.2 (first published release whose tag contains the merge commit). Last checked .

Symptom

The linked issue does not give an exception string. After HumanInTheLoopMiddleware and a decision whose type is edit, the edited tool runs, and a later step issues the original tool call again.

Evidence what you'll see

  • The resume payload uses type set to edit and an edited_action. The report says the edited call runs, then the agent compares the original request with that result and emits the original call.
  • The tools in the repro are read_email_tool and send_email_tool. The interrupt allows approve, edit, and reject on send_email_tool.

Why it happens

Pull request 40463 says the edit rewrote AIMessage.tool_calls, so a later turn saw a tool call the model had not generated. The change edits ToolCallRequest instead, and adds a notice on the ToolMessage with the name and arguments that actually ran.

Affected versions

langchain 1.0.3, langchain-core 1.0.2, langgraph 1.0.2, Python 3.13.9. Darwin kernel 25.0.0, arm64. The repro uses create_agent, HumanInTheLoopMiddleware, InMemorySaver, and a thread_id.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

How to check it worked

  • Resume with type set to edit and an edited_action. The edited tool runs once, and the following step does not issue the original call.

If it still fails

  • An earlier pull request, #33789, was not the one merged. A comment on 7 Nov 2025 shows BadRequestError when a local branch left a tool_call_id without a tool message. That error is from that branch, not from pull request 40463.
  • The linked issue does not describe a remaining retry of the original call after pull request 40463.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it