What this thread does
Do first: Upgrade LangChain to langchain==1.5.2.
Symptom
lesong36 reported an edited action executing, followed by a new call using the original arguments. This is a repeated-action symptom, not an exception message. Other users reporting or reproducing it include hopegood, zhangzhefang-github, and kingpy-bot.
Cause
Editing AIMessage.tool_calls changed the conversation history to imply the model itself had chosen the revised call. The merged PR identifies a mismatch with model reasoning as a possible contributor to retries. The replacement edits ToolCallRequest at execution time and adds an intervention notice to the resulting ToolMessage. Merged fix.
Fix
1. Upgrade LangChain to langchain==1.5.2 (released 2026-11-18). 2. Keep using the HITL edit decision: the middleware preserves the original model call, executes the reviewer’s replacement, and annotates its result.
November release; the source at that tag preserves the model-generated call, substitutes the reviewer’s call at execution, and annotates the result.
Fixed in
First stable langchain==1.4.2 (released 2026-09-18), containing PR #40463 (merged 2026-09-18). The first carrying release was stable.
If it still fails
- The PR addresses the repeated-call behavior through execution-time substitution and a result notice; it does not promise that every model can never issue a new call. It also notes existing provider message-block differences, so rewriting
AIMessage.tool_callsyourself is not the prescribed fix.
Not for: LangChain approval gates disappearing because allowed_decisions is missing or empty.
Sources
- Agent re-attempts original tool call after HumanInTheLoopMiddleware edit decision, lesong36, opened 2025-11-02; closed as completed on 2026-09-18: "Agent re-attempts original tool call"
- fix(langchain): preserve model-generated tool calls in HITL tool call edits and add notice to ToolMessage, ccurme; merged 2026-09-18.
- langchain==1.4.2, released 2026-09-18.
- langchain==1.5.2, released 2026-11-18.
- Middleware source at langchain==1.5.2.
Checked
2026-11-24; read the issue and comments API records, merged PR API record, fix-release and November stable release records, and source at the November stable tag; no command was run.
Started from a post by @lesong36, packaged by the editor. Original post