LangGraph client-tool confirmation interrupt raises KeyError: 'name'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 420
- Forks
- 60
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 4
Description
Description
The LangGraph runtime fails while converting a client-tool confirmation interrupt into the CTS ToolRequest format.
The failure is observed in:
tests/clienttools/execution/test_agent_execution_with_1_clienttool_confirmation.pytest_agent_with_1_clienttool_confirmation_accept_flowtest_agent_with_1_clienttool_confirmation_reject_flow
The LangGraph adapter creates the confirmation payload in _langgraphconverter.py using the following structure:
{
"action_requests": [
{
"name": tool_name,
"arguments": tool_arguments,
"description": ...
}
],
"review_configs": [...]
}
Therefore, the tool name is nested under action_requests[0]["name"]; there is no top-level name field.
However, langgraphruntime/runtime.py treats every interrupt as a direct tool request and executes:
tool_request = interrupt.value
ToolRequest(
name=tool_request["name"],
...
)
This occurs at runtime.py:139-144 and raises:
KeyError: 'name'
The runtime therefore fails before the CTS test can complete the confirmation accept or reject flow. The confirmation interrupt is generated correctly, but it is interpreted using the wrong interrupt schema.
The same runtime path is also used for client-tool execution, which explains why both client-tool confirmation cases fail with the same error.
Expected behavior
The runtime should distinguish between:
- A confirmation interrupt containing
action_requestsandreview_configs. - A direct client-tool request containing top-level
name,description, andinputs.
A confirmation interrupt should be converted into the CTS confirmation status, allowing the caller to invoke confirm_or_reject_tool_confirmation() and continue with either the accepted or rejected path.
Relevant code
agent-spec/conformance_test_suite/runtimes/langgraphruntime/src/langgraphruntime/runtime.py:135-150agent-spec/pyagentspec/src/pyagentspec/adapters/langgraph/_langgraphconverter.py:950-970agent-spec/pyagentspec/src/pyagentspec/adapters/langgraph/_langgraphconverter.py:1784-1806
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with runtime.py:135-150 and compare its interrupt handling with the confirmation payload assembled in _langgraphconverter.py:950-970 and 1784-1806. Run the two named tests in tests/clienttools/execution/test_agent_execution_with_1_clienttool_confirmation.py. Done means both accept and reject flows complete without KeyError and continue through the CTS confirmation status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100