Filing this here after a deepagents discussion (langchain-ai/deepagents#2798) where it came up building an external human-in-the-loop consumer. Yokubjon (@yakubka) confirmed the gap there and suggested opening an issue or PR that references the discussion; since ActionRequest is defined in this repo, langgraph seems like the right home for it.
When execution pauses on a tool call for human review, the interrupt surfaces an ActionRequest with action and args, but not the originating tool_call_id. On resume, a consumer reconstructing the ToolMessage needs that id to match the original call in the message history, so today it has to be recovered out of band, either from the raw interrupt value or by reading agent.get_state(config) and pulling AIMessage.tool_calls[*].id. The id already exists at the point the interrupt is created; it just isn't carried onto the artifact the consumer sees.
Proposal: carry the originating tool_call_id as an optional field on ActionRequest (or alongside it on the interrupt payload), populated where the interrupt is constructed from a tool call. As an optional field it stays backward compatible and leaves non-tool-call interrupts unchanged, and it removes the cross-surface correlation for external consumers, so the approval artifact carries the one field that ties it back to the specific call.
Happy to open a PR if this seems reasonable. One open question for you: should the field sit on ActionRequest itself, or on the surrounding interrupt payload?
Reference: langchain-ai/deepagents#2798
Filing this here after a deepagents discussion (langchain-ai/deepagents#2798) where it came up building an external human-in-the-loop consumer. Yokubjon (@yakubka) confirmed the gap there and suggested opening an issue or PR that references the discussion; since
ActionRequestis defined in this repo, langgraph seems like the right home for it.When execution pauses on a tool call for human review, the interrupt surfaces an
ActionRequestwithactionandargs, but not the originatingtool_call_id. On resume, a consumer reconstructing theToolMessageneeds that id to match the original call in the message history, so today it has to be recovered out of band, either from the raw interrupt value or by readingagent.get_state(config)and pullingAIMessage.tool_calls[*].id. The id already exists at the point the interrupt is created; it just isn't carried onto the artifact the consumer sees.Proposal: carry the originating
tool_call_idas an optional field onActionRequest(or alongside it on the interrupt payload), populated where the interrupt is constructed from a tool call. As an optional field it stays backward compatible and leaves non-tool-call interrupts unchanged, and it removes the cross-surface correlation for external consumers, so the approval artifact carries the one field that ties it back to the specific call.Happy to open a PR if this seems reasonable. One open question for you: should the field sit on
ActionRequestitself, or on the surrounding interrupt payload?Reference: langchain-ai/deepagents#2798