Skip to content

ExecutorToolNode breaks on langgraph-prebuilt >= 1.1.0: ToolNode._extract_state() missing required 'config' argument #213

Description

@WilliamBenEmbarek

Summary

ExecutorToolNode (which subclasses langgraph.prebuilt.ToolNode) calls the private
self._extract_state(input) with a single argument. In langgraph-prebuilt 1.1.0 the
signature changed to _extract_state(self, input, config) with config required, so
every tool execution now raises:

TypeError: ToolNode._extract_state() missing 1 required positional argument: 'config'

This breaks all mobile-use tasks the moment langgraph-prebuilt resolves to 1.1.0 or newer.

Environment

  • minitap-mobile-use==3.6.3 (latest on PyPI)
  • langgraph-prebuilt==1.1.0 (pulled transitively by langgraph>=1.2.4, e.g. via langchain>=1.3.9)
  • Python 3.12

Your declared constraint is langgraph>=1.0.2,<2.0.0, which permits 1.1.x/1.2.x, so any
downstream project on a recent langchain/langgraph will hit this.

Root cause

minitap/mobile_use/agents/executor/tool_node.py, in _build_tool_runtime (~line 57):

def _build_tool_runtime(self, call, input, config, runtime):
    state = self._extract_state(input)          # <-- one arg
    return ToolRuntime(state=state, ..., config=config, ...)

In langgraph-prebuilt 1.0.x the base method was _extract_state(self, input) — this worked.

In 1.1.0 it became:

def _extract_state(self, input, config: RunnableConfig) -> ...:
    # config is now used to hydrate state from channels (CONFIG_KEY_READ)
    # when input is a list of ToolCall dicts (new Send payload shape)

So config is now both required and functionally used.

Reproduction

# with langgraph-prebuilt>=1.1.0 installed
from minitap.mobile_use.sdk.agent import Agent
# ... run any task; it fails inside ExecutorToolNode._build_tool_runtime

Suggested fix

_build_tool_runtime already receives config, so it can be forwarded directly:

state = self._extract_state(input, config)

To stay compatible with both 1.0.x and 1.1.x, a version-guarded call works:

import inspect

if "config" in inspect.signature(super()._extract_state).parameters:
    state = self._extract_state(input, config)
else:
    state = self._extract_state(input)

It's also worth reviewing the other private-API overrides in this class
(_afunc, _func, _parse_input, _run_one/_arun_one, _combine_tool_outputs)
against 1.1.0, and tightening the langgraph constraint (e.g. <1.1) until the class is
confirmed compatible, so downstream resolvers don't silently pull an incompatible version.

Workaround (for downstream users, until this is released)

Pin below the break:

langgraph-prebuilt<1.1
langgraph<1.1   # e.g. langgraph==1.0.10; also hold langchain<1.3 since langchain>=1.3.9 requires langgraph>=1.2.4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions