When prebuilt==0.2.2 upgraded to 0.5.0, interrupt in tool doesn't work, it caused loop exited. #782

Closed
opened 2026-02-20 17:41:43 -05:00 by yindo · 12 comments
Owner

Originally created by @Fly-Playgroud on GitHub (Jul 9, 2025).

Originally assigned to: @casparb, @sydney-runkle on GitHub.

Checked other resources

  • This is a bug, not a usage question. For questions, please use GitHub Discussions.
  • I added a clear and detailed title that summarizes the issue.
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.

Example Code

test

Error Message and Stack Trace (if applicable)

no error message

Description

When prebuilt==0.2.2 upgraded to 0.5.0, interrupt in tool doesn't work, it caused loop exited.
langraph also upgraded to 0.5.0

I tried downgrading prebuilt to 0.2.2 and it worked fine.

System Info

test

Originally created by @Fly-Playgroud on GitHub (Jul 9, 2025). Originally assigned to: @casparb, @sydney-runkle on GitHub. ### Checked other resources - [x] This is a bug, not a usage question. For questions, please use GitHub Discussions. - [x] I added a clear and detailed title that summarizes the issue. - [x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example). - [x] I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue. ### Example Code ```python test ``` ### Error Message and Stack Trace (if applicable) ```shell no error message ``` ### Description When prebuilt==0.2.2 upgraded to 0.5.0, `interrupt` in tool doesn't work, it caused loop exited. langraph also upgraded to 0.5.0 I tried downgrading prebuilt to 0.2.2 and it worked fine. ### System Info test
yindo added the bug label 2026-02-20 17:41:43 -05:00
yindo closed this issue 2026-02-20 17:41:43 -05:00
Author
Owner

@Fly-Playgroud commented on GitHub (Jul 9, 2025):

My initial judgment is that in 0.5.0, create_react_agent uses CompiledStateGraph instead of CompiledGraph

@Fly-Playgroud commented on GitHub (Jul 9, 2025): My initial judgment is that in 0.5.0, `create_react_agent` uses `CompiledStateGraph` instead of `CompiledGraph`
Author
Owner

@gcalabria commented on GitHub (Jul 9, 2025):

Same problem here.

@gcalabria commented on GitHub (Jul 9, 2025): Same problem here.
Author
Owner

@sydney-runkle commented on GitHub (Jul 9, 2025):

Hmm, the graph underneath shouldn't be a problem here.

Could you please attach a reproducible snippet (MRE)? Happy to help debug.

@sydney-runkle commented on GitHub (Jul 9, 2025): Hmm, the graph underneath shouldn't be a problem here. Could you please attach a reproducible snippet (MRE)? Happy to help debug.
Author
Owner

@Fly-Playgroud commented on GitHub (Jul 10, 2025):

Hmm, the graph underneath shouldn't be a problem here.

Could you please attach a reproducible snippet (MRE)? Happy to help debug.

After I debuged that when upgraded, if set stream=values , the interrupt msg doesn't out put in agent.astream

@Fly-Playgroud commented on GitHub (Jul 10, 2025): > Hmm, the graph underneath shouldn't be a problem here. > > Could you please attach a reproducible snippet (MRE)? Happy to help debug. After I debuged that when upgraded, if set `stream=values` , the interrupt msg doesn't out put in `agent.astream`
Author
Owner

@Fly-Playgroud commented on GitHub (Jul 10, 2025):

So in high version, stream_mode=values's behavior was changed. why do this?

@Fly-Playgroud commented on GitHub (Jul 10, 2025): So in high version, `stream_mode=values`'s behavior was changed. why do this?
Author
Owner

@sydney-runkle commented on GitHub (Jul 10, 2025):

@Fly-Playgroud could you please provide a minimal reproducible example? Then we can help debug!

@sydney-runkle commented on GitHub (Jul 10, 2025): @Fly-Playgroud could you please provide a minimal reproducible example? Then we can help debug!
Author
Owner

@Fly-Playgroud commented on GitHub (Jul 11, 2025):

@Fly-Playgroud could you please provide a minimal reproducible example? Then we can help debug!


import asyncio
from contextlib import asynccontextmanager

from langchain_core.messages import HumanMessage
from langchain_core.tools import tool
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from langgraph.checkpoint.memory import MemorySaver
from langgraph.types import interrupt
from openai import BaseModel
from pydantic import Field

import config

llm = ChatOpenAI = ChatOpenAI(
    model=config.LLMConfig.MODEL,
    api_key=config.LLMConfig.API_KEY,
    base_url=config.LLMConfig.BASE_URL,
)

check_pointer = MemorySaver()


class Assistant(BaseModel):
    """
    The assistant tool
    """
    content: str = Field(
        ...,
        description="Indicates what needs assistance",
    )


@asynccontextmanager
async def error_handler(operation: str):
    try:
        print(f"Starting {operation}")
        yield
    except Exception as e:
        print(f"Error occurred during {operation}")
    finally:
        print("Finally")


@tool(args_schema=Assistant,
      description="It is used to ask for help from humans in certain scenarios, such as not being able to solve the CAPTCHA。")
def assistance(
        content: str,
):
    result = interrupt(
        {
            "content": content,
        }
    )
    return result


run_config = {
    "configurable": {
        "thread_id": "1"
    }
}

agent = create_react_agent(
    model=llm,
    tools=[assistance],
    checkpointer=check_pointer,
)

message = HumanMessage(content="directly call assistance tool")


async def main():
    async with error_handler("agent.astream"):
        async for event in agent.astream({"messages": [message]}, config=run_config, stream_mode="values"):
            print(event)

        print(agent.stream_mode)


if __name__ == '__main__':
    asyncio.run(main())


when stream_mode="values", the interrupt msg don't in out put event.

@Fly-Playgroud commented on GitHub (Jul 11, 2025): > [@Fly-Playgroud](https://github.com/Fly-Playgroud) could you please provide a minimal reproducible example? Then we can help debug! ```python import asyncio from contextlib import asynccontextmanager from langchain_core.messages import HumanMessage from langchain_core.tools import tool from langchain_openai import ChatOpenAI from langgraph.prebuilt import create_react_agent from langgraph.checkpoint.memory import MemorySaver from langgraph.types import interrupt from openai import BaseModel from pydantic import Field import config llm = ChatOpenAI = ChatOpenAI( model=config.LLMConfig.MODEL, api_key=config.LLMConfig.API_KEY, base_url=config.LLMConfig.BASE_URL, ) check_pointer = MemorySaver() class Assistant(BaseModel): """ The assistant tool """ content: str = Field( ..., description="Indicates what needs assistance", ) @asynccontextmanager async def error_handler(operation: str): try: print(f"Starting {operation}") yield except Exception as e: print(f"Error occurred during {operation}") finally: print("Finally") @tool(args_schema=Assistant, description="It is used to ask for help from humans in certain scenarios, such as not being able to solve the CAPTCHA。") def assistance( content: str, ): result = interrupt( { "content": content, } ) return result run_config = { "configurable": { "thread_id": "1" } } agent = create_react_agent( model=llm, tools=[assistance], checkpointer=check_pointer, ) message = HumanMessage(content="directly call assistance tool") async def main(): async with error_handler("agent.astream"): async for event in agent.astream({"messages": [message]}, config=run_config, stream_mode="values"): print(event) print(agent.stream_mode) if __name__ == '__main__': asyncio.run(main()) ``` when stream_mode="values", the interrupt msg don't in out put event.
Author
Owner

@gcalabria commented on GitHub (Jul 11, 2025):

Here is another example:

from langgraph.prebuilt import create_react_agent
from langchain_core.tools import tool
from langgraph.types import interrupt
from langchain_openai import ChatOpenAI


@tool
def human_input(input: str) -> str:
    """
    Request human input
    """
    print("Requesting human input")
    human_input = interrupt("Please provide your input")
    print(f"Human input: {human_input}")
    return human_input


agent = create_react_agent(
    model=ChatOpenAI(model="gpt-4o-mini", name="george"),
    tools=[human_input],
)

stream = agent.astream(
    input={
        "messages": [
            ("system", "You are a helpful assistant."),
            ("user", "Call your `human_input` tool to gather the user's input"),
            
        ]
    },
    stream_mode=["values"],
)

async for chunk in stream:
    print(chunk)

Here is the output:

('values', {'messages': [SystemMessage(content='You are a helpful assistant.', additional_kwargs={}, response_metadata={}, id='523804a5-6986-4c8e-ba8e-1832162136b5'), HumanMessage(content="Call your `human_input` tool to gather the user's input", additional_kwargs={}, response_metadata={}, id='a0e68485-f464-416b-9396-2974a1552a60')]})
('values', {'messages': [SystemMessage(content='You are a helpful assistant.', additional_kwargs={}, response_metadata={}, id='523804a5-6986-4c8e-ba8e-1832162136b5'), HumanMessage(content="Call your `human_input` tool to gather the user's input", additional_kwargs={}, response_metadata={}, id='a0e68485-f464-416b-9396-2974a1552a60'), AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_CX1Pi5U2rjffjLS0XN8ZyVPk', 'function': {'arguments': '{"input":"Please provide your input."}', 'name': 'human_input'}, 'type': 'function'}], 'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 19, 'prompt_tokens': 59, 'total_tokens': 78, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 0}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_34a54ae93c', 'id': 'chatcmpl-Bs8EngUpxemsGUZMnpcDL0ri9Lhxm', 'service_tier': 'default', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run--dbb07e41-3d84-4183-bb81-20c0835ef498-0', tool_calls=[{'name': 'human_input', 'args': {'input': 'Please provide your input.'}, 'id': 'call_CX1Pi5U2rjffjLS0XN8ZyVPk', 'type': 'tool_call'}], usage_metadata={'input_tokens': 59, 'output_tokens': 19, 'total_tokens': 78, 'input_token_details': {'audio': 0, 'cache_read': 0}, 'output_token_details': {'audio': 0, 'reasoning': 0}})]})
Requesting human input

Here is the versions I'm using:

Package                       Version
----------------------------- -----------
aiohappyeyeballs              2.6.1
aiohttp                       3.12.14
aiosignal                     1.4.0
annotated-types               0.7.0
anyio                         4.9.0
appnope                       0.1.4
argcomplete                   3.6.2
asttokens                     3.0.0
asyncpg                       0.30.0
attrs                         25.3.0
black                         25.1.0
certifi                       2025.7.9
charset-normalizer            3.4.2
click                         8.2.1
comm                          0.2.2
dataclasses-json              0.6.7
datamodel-code-generator      0.30.0
debugpy                       1.8.14
decorator                     5.2.1
distro                        1.9.0
dnspython                     2.7.0
email-validator               2.2.0
executing                     2.2.0
fastapi                       0.115.12
fastapi-cli                   0.0.8
fastapi-cloud-cli             0.1.2
firecrawl-py                  2.15.0
frozenlist                    1.7.0
genson                        1.3.0
h11                           0.16.0
httpcore                      1.0.9
httptools                     0.6.4
httpx                         0.28.1
httpx-sse                     0.4.1
idna                          3.10
inflect                       7.5.0
ipykernel                     6.29.5
ipython                       9.4.0
ipython-pygments-lexers       1.1.1
isort                         6.0.1
jedi                          0.19.2
jinja2                        3.1.6
jiter                         0.10.0
jsonpatch                     1.33
jsonpointer                   3.0.0
jupyter-client                8.6.3
jupyter-core                  5.8.1
langchain                     0.3.26
langchain-community           0.3.27
langchain-core                0.3.68
langchain-openai              0.3.27
langchain-text-splitters      0.3.8
langgraph                     0.5.2
langgraph-checkpoint          2.1.0
langgraph-checkpoint-postgres 2.0.22
langgraph-prebuilt            0.5.2
langgraph-sdk                 0.1.72
langgraph-swarm               0.0.12
langsmith                     0.4.5
markdown-it-py                3.0.0
markupsafe                    3.0.2
marshmallow                   3.26.1
matplotlib-inline             0.1.7
mdurl                         0.1.2
more-itertools                10.7.0
multidict                     6.6.3
mypy-extensions               1.1.0
nest-asyncio                  1.6.0
numpy                         2.3.1
openai                        1.95.0
orjson                        3.10.18
ormsgpack                     1.10.0
packaging                     24.2
parso                         0.8.4
pathspec                      0.12.1
pexpect                       4.9.0
platformdirs                  4.3.8
prompt-toolkit                3.0.51
propcache                     0.3.2
psutil                        7.0.0
psycopg                       3.2.9
psycopg-pool                  3.2.6
psycopg2                      2.9.10
ptyprocess                    0.7.0
pure-eval                     0.2.3
pydantic                      2.11.7
pydantic-core                 2.33.2
pydantic-settings             2.10.1
pygments                      2.19.2
python-dateutil               2.9.0.post0
python-dotenv                 1.1.0
python-multipart              0.0.20
pyyaml                        6.0.2
pyzmq                         27.0.0
regex                         2024.11.6
requests                      2.32.4
requests-toolbelt             1.0.0
rich                          14.0.0
rich-toolkit                  0.14.8
rignore                       0.5.1
sentry-sdk                    2.32.0
shellingham                   1.5.4
six                           1.17.0
sniffio                       1.3.1
sqlalchemy                    2.0.41
stack-data                    0.6.3
starlette                     0.46.2
tenacity                      9.1.2
tiktoken                      0.9.0
tornado                       6.5.1
tqdm                          4.67.1
traitlets                     5.14.3
typeguard                     4.4.4
typer                         0.16.0
typing-extensions             4.14.1
typing-inspect                0.9.0
typing-inspection             0.4.1
urllib3                       2.5.0
uvicorn                       0.35.0
uvloop                        0.21.0
watchfiles                    1.1.0
wcwidth                       0.2.13
websockets                    15.0.1
xxhash                        3.5.0
yarl                          1.20.1
zstandard                     0.23.0

If I use the following versions, then it works:

Package                       Version
----------------------------- -----------
aiohappyeyeballs              2.6.1
aiohttp                       3.12.14
aiosignal                     1.4.0
annotated-types               0.7.0
anyio                         4.9.0
appnope                       0.1.4
asttokens                     3.0.0
attrs                         25.3.0
certifi                       2025.7.9
charset-normalizer            3.4.2
click                         8.2.1
comm                          0.2.2
dataclasses-json              0.6.7
debugpy                       1.8.14
decorator                     5.2.1
distro                        1.9.0
dnspython                     2.7.0
email-validator               2.2.0
executing                     2.2.0
fastapi                       0.115.12
fastapi-cli                   0.0.8
fastapi-cloud-cli             0.1.4
firecrawl-py                  2.15.0
frozenlist                    1.7.0
h11                           0.16.0
httpcore                      1.0.9
httptools                     0.6.4
httpx                         0.28.1
httpx-sse                     0.4.1
idna                          3.10
ipykernel                     6.29.5
ipython                       9.4.0
ipython-pygments-lexers       1.1.1
jedi                          0.19.2
jinja2                        3.1.6
jiter                         0.10.0
jsonpatch                     1.33
jsonpointer                   3.0.0
jupyter-client                8.6.3
jupyter-core                  5.8.1
langchain                     0.3.25
langchain-community           0.3.24
langchain-core                0.3.62
langchain-openai              0.3.18
langchain-text-splitters      0.3.8
langgraph                     0.4.7
langgraph-checkpoint          2.1.0
langgraph-checkpoint-postgres 2.0.21
langgraph-prebuilt            0.2.1
langgraph-sdk                 0.1.72
langgraph-swarm               0.0.11
langsmith                     0.3.42
markdown-it-py                3.0.0
markupsafe                    3.0.2
marshmallow                   3.26.1
matplotlib-inline             0.1.7
mdurl                         0.1.2
multidict                     6.6.3
mypy-extensions               1.1.0
nest-asyncio                  1.6.0
numpy                         2.3.1
openai                        1.95.0
orjson                        3.10.18
ormsgpack                     1.10.0
packaging                     24.2
parso                         0.8.4
pexpect                       4.9.0
platformdirs                  4.3.8
prompt-toolkit                3.0.51
propcache                     0.3.2
psutil                        7.0.0
psycopg                       3.2.9
psycopg-pool                  3.2.6
psycopg2                      2.9.10
ptyprocess                    0.7.0
pure-eval                     0.2.3
pydantic                      2.11.7
pydantic-core                 2.33.2
pydantic-settings             2.10.1
pygments                      2.19.2
python-dateutil               2.9.0.post0
python-dotenv                 1.1.1
python-multipart              0.0.20
pyyaml                        6.0.2
pyzmq                         27.0.0
regex                         2024.11.6
requests                      2.32.4
requests-toolbelt             1.0.0
rich                          14.0.0
rich-toolkit                  0.14.8
rignore                       0.5.1
ruff                          0.11.11
sentry-sdk                    2.32.0
shellingham                   1.5.4
six                           1.17.0
sniffio                       1.3.1
sqlalchemy                    2.0.41
stack-data                    0.6.3
starlette                     0.46.2
tenacity                      9.1.2
tiktoken                      0.9.0
tornado                       6.5.1
tqdm                          4.67.1
traitlets                     5.14.3
typer                         0.16.0
typing-extensions             4.14.1
typing-inspect                0.9.0
typing-inspection             0.4.1
urllib3                       2.5.0
uvicorn                       0.35.0
uvloop                        0.21.0
watchfiles                    1.1.0
wcwidth                       0.2.13
websockets                    15.0.1
xxhash                        3.5.0
yarl                          1.20.1
zstandard                     0.23.0

Output with working versions:

('values', {'messages': [SystemMessage(content='You are a helpful assistant.', additional_kwargs={}, response_metadata={}, id='e9037da1-32be-4929-abf9-2d93d7e3dd9c'), HumanMessage(content="Call your `human_input` tool to gather the user's input", additional_kwargs={}, response_metadata={}, id='a507d4c7-f5e0-49dd-a257-c35c55fce865')]})
('values', {'messages': [SystemMessage(content='You are a helpful assistant.', additional_kwargs={}, response_metadata={}, id='e9037da1-32be-4929-abf9-2d93d7e3dd9c'), HumanMessage(content="Call your `human_input` tool to gather the user's input", additional_kwargs={}, response_metadata={}, id='a507d4c7-f5e0-49dd-a257-c35c55fce865'), AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_yjAuh1dXk6bv2ovejyuUdl1X', 'function': {'arguments': '{"input":"Please provide your input or question."}', 'name': 'human_input'}, 'type': 'function'}], 'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 21, 'prompt_tokens': 59, 'total_tokens': 80, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 0}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_34a54ae93c', 'id': 'chatcmpl-Bs9PTrBjCvT6S1GYwzxMnnrNOsrPl', 'service_tier': 'default', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run--77ee9c69-efde-4322-b3b1-8c5a83876f27-0', tool_calls=[{'name': 'human_input', 'args': {'input': 'Please provide your input or question.'}, 'id': 'call_yjAuh1dXk6bv2ovejyuUdl1X', 'type': 'tool_call'}], usage_metadata={'input_tokens': 59, 'output_tokens': 21, 'total_tokens': 80, 'input_token_details': {'audio': 0, 'cache_read': 0}, 'output_token_details': {'audio': 0, 'reasoning': 0}})]})
Requesting human input
('values', {'__interrupt__': (Interrupt(value='Please provide your input', resumable=True, ns=['tools:817a76e8-9620-8b68-e7af-3f339297705a']),)})
@gcalabria commented on GitHub (Jul 11, 2025): Here is another example: ```python from langgraph.prebuilt import create_react_agent from langchain_core.tools import tool from langgraph.types import interrupt from langchain_openai import ChatOpenAI @tool def human_input(input: str) -> str: """ Request human input """ print("Requesting human input") human_input = interrupt("Please provide your input") print(f"Human input: {human_input}") return human_input agent = create_react_agent( model=ChatOpenAI(model="gpt-4o-mini", name="george"), tools=[human_input], ) stream = agent.astream( input={ "messages": [ ("system", "You are a helpful assistant."), ("user", "Call your `human_input` tool to gather the user's input"), ] }, stream_mode=["values"], ) async for chunk in stream: print(chunk) ``` Here is the output: ``` ('values', {'messages': [SystemMessage(content='You are a helpful assistant.', additional_kwargs={}, response_metadata={}, id='523804a5-6986-4c8e-ba8e-1832162136b5'), HumanMessage(content="Call your `human_input` tool to gather the user's input", additional_kwargs={}, response_metadata={}, id='a0e68485-f464-416b-9396-2974a1552a60')]}) ('values', {'messages': [SystemMessage(content='You are a helpful assistant.', additional_kwargs={}, response_metadata={}, id='523804a5-6986-4c8e-ba8e-1832162136b5'), HumanMessage(content="Call your `human_input` tool to gather the user's input", additional_kwargs={}, response_metadata={}, id='a0e68485-f464-416b-9396-2974a1552a60'), AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_CX1Pi5U2rjffjLS0XN8ZyVPk', 'function': {'arguments': '{"input":"Please provide your input."}', 'name': 'human_input'}, 'type': 'function'}], 'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 19, 'prompt_tokens': 59, 'total_tokens': 78, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 0}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_34a54ae93c', 'id': 'chatcmpl-Bs8EngUpxemsGUZMnpcDL0ri9Lhxm', 'service_tier': 'default', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run--dbb07e41-3d84-4183-bb81-20c0835ef498-0', tool_calls=[{'name': 'human_input', 'args': {'input': 'Please provide your input.'}, 'id': 'call_CX1Pi5U2rjffjLS0XN8ZyVPk', 'type': 'tool_call'}], usage_metadata={'input_tokens': 59, 'output_tokens': 19, 'total_tokens': 78, 'input_token_details': {'audio': 0, 'cache_read': 0}, 'output_token_details': {'audio': 0, 'reasoning': 0}})]}) Requesting human input ``` Here is the versions I'm using: ``` Package Version ----------------------------- ----------- aiohappyeyeballs 2.6.1 aiohttp 3.12.14 aiosignal 1.4.0 annotated-types 0.7.0 anyio 4.9.0 appnope 0.1.4 argcomplete 3.6.2 asttokens 3.0.0 asyncpg 0.30.0 attrs 25.3.0 black 25.1.0 certifi 2025.7.9 charset-normalizer 3.4.2 click 8.2.1 comm 0.2.2 dataclasses-json 0.6.7 datamodel-code-generator 0.30.0 debugpy 1.8.14 decorator 5.2.1 distro 1.9.0 dnspython 2.7.0 email-validator 2.2.0 executing 2.2.0 fastapi 0.115.12 fastapi-cli 0.0.8 fastapi-cloud-cli 0.1.2 firecrawl-py 2.15.0 frozenlist 1.7.0 genson 1.3.0 h11 0.16.0 httpcore 1.0.9 httptools 0.6.4 httpx 0.28.1 httpx-sse 0.4.1 idna 3.10 inflect 7.5.0 ipykernel 6.29.5 ipython 9.4.0 ipython-pygments-lexers 1.1.1 isort 6.0.1 jedi 0.19.2 jinja2 3.1.6 jiter 0.10.0 jsonpatch 1.33 jsonpointer 3.0.0 jupyter-client 8.6.3 jupyter-core 5.8.1 langchain 0.3.26 langchain-community 0.3.27 langchain-core 0.3.68 langchain-openai 0.3.27 langchain-text-splitters 0.3.8 langgraph 0.5.2 langgraph-checkpoint 2.1.0 langgraph-checkpoint-postgres 2.0.22 langgraph-prebuilt 0.5.2 langgraph-sdk 0.1.72 langgraph-swarm 0.0.12 langsmith 0.4.5 markdown-it-py 3.0.0 markupsafe 3.0.2 marshmallow 3.26.1 matplotlib-inline 0.1.7 mdurl 0.1.2 more-itertools 10.7.0 multidict 6.6.3 mypy-extensions 1.1.0 nest-asyncio 1.6.0 numpy 2.3.1 openai 1.95.0 orjson 3.10.18 ormsgpack 1.10.0 packaging 24.2 parso 0.8.4 pathspec 0.12.1 pexpect 4.9.0 platformdirs 4.3.8 prompt-toolkit 3.0.51 propcache 0.3.2 psutil 7.0.0 psycopg 3.2.9 psycopg-pool 3.2.6 psycopg2 2.9.10 ptyprocess 0.7.0 pure-eval 0.2.3 pydantic 2.11.7 pydantic-core 2.33.2 pydantic-settings 2.10.1 pygments 2.19.2 python-dateutil 2.9.0.post0 python-dotenv 1.1.0 python-multipart 0.0.20 pyyaml 6.0.2 pyzmq 27.0.0 regex 2024.11.6 requests 2.32.4 requests-toolbelt 1.0.0 rich 14.0.0 rich-toolkit 0.14.8 rignore 0.5.1 sentry-sdk 2.32.0 shellingham 1.5.4 six 1.17.0 sniffio 1.3.1 sqlalchemy 2.0.41 stack-data 0.6.3 starlette 0.46.2 tenacity 9.1.2 tiktoken 0.9.0 tornado 6.5.1 tqdm 4.67.1 traitlets 5.14.3 typeguard 4.4.4 typer 0.16.0 typing-extensions 4.14.1 typing-inspect 0.9.0 typing-inspection 0.4.1 urllib3 2.5.0 uvicorn 0.35.0 uvloop 0.21.0 watchfiles 1.1.0 wcwidth 0.2.13 websockets 15.0.1 xxhash 3.5.0 yarl 1.20.1 zstandard 0.23.0 ``` If I use the following versions, then it works: ``` Package Version ----------------------------- ----------- aiohappyeyeballs 2.6.1 aiohttp 3.12.14 aiosignal 1.4.0 annotated-types 0.7.0 anyio 4.9.0 appnope 0.1.4 asttokens 3.0.0 attrs 25.3.0 certifi 2025.7.9 charset-normalizer 3.4.2 click 8.2.1 comm 0.2.2 dataclasses-json 0.6.7 debugpy 1.8.14 decorator 5.2.1 distro 1.9.0 dnspython 2.7.0 email-validator 2.2.0 executing 2.2.0 fastapi 0.115.12 fastapi-cli 0.0.8 fastapi-cloud-cli 0.1.4 firecrawl-py 2.15.0 frozenlist 1.7.0 h11 0.16.0 httpcore 1.0.9 httptools 0.6.4 httpx 0.28.1 httpx-sse 0.4.1 idna 3.10 ipykernel 6.29.5 ipython 9.4.0 ipython-pygments-lexers 1.1.1 jedi 0.19.2 jinja2 3.1.6 jiter 0.10.0 jsonpatch 1.33 jsonpointer 3.0.0 jupyter-client 8.6.3 jupyter-core 5.8.1 langchain 0.3.25 langchain-community 0.3.24 langchain-core 0.3.62 langchain-openai 0.3.18 langchain-text-splitters 0.3.8 langgraph 0.4.7 langgraph-checkpoint 2.1.0 langgraph-checkpoint-postgres 2.0.21 langgraph-prebuilt 0.2.1 langgraph-sdk 0.1.72 langgraph-swarm 0.0.11 langsmith 0.3.42 markdown-it-py 3.0.0 markupsafe 3.0.2 marshmallow 3.26.1 matplotlib-inline 0.1.7 mdurl 0.1.2 multidict 6.6.3 mypy-extensions 1.1.0 nest-asyncio 1.6.0 numpy 2.3.1 openai 1.95.0 orjson 3.10.18 ormsgpack 1.10.0 packaging 24.2 parso 0.8.4 pexpect 4.9.0 platformdirs 4.3.8 prompt-toolkit 3.0.51 propcache 0.3.2 psutil 7.0.0 psycopg 3.2.9 psycopg-pool 3.2.6 psycopg2 2.9.10 ptyprocess 0.7.0 pure-eval 0.2.3 pydantic 2.11.7 pydantic-core 2.33.2 pydantic-settings 2.10.1 pygments 2.19.2 python-dateutil 2.9.0.post0 python-dotenv 1.1.1 python-multipart 0.0.20 pyyaml 6.0.2 pyzmq 27.0.0 regex 2024.11.6 requests 2.32.4 requests-toolbelt 1.0.0 rich 14.0.0 rich-toolkit 0.14.8 rignore 0.5.1 ruff 0.11.11 sentry-sdk 2.32.0 shellingham 1.5.4 six 1.17.0 sniffio 1.3.1 sqlalchemy 2.0.41 stack-data 0.6.3 starlette 0.46.2 tenacity 9.1.2 tiktoken 0.9.0 tornado 6.5.1 tqdm 4.67.1 traitlets 5.14.3 typer 0.16.0 typing-extensions 4.14.1 typing-inspect 0.9.0 typing-inspection 0.4.1 urllib3 2.5.0 uvicorn 0.35.0 uvloop 0.21.0 watchfiles 1.1.0 wcwidth 0.2.13 websockets 15.0.1 xxhash 3.5.0 yarl 1.20.1 zstandard 0.23.0 ``` Output with working versions: ``` ('values', {'messages': [SystemMessage(content='You are a helpful assistant.', additional_kwargs={}, response_metadata={}, id='e9037da1-32be-4929-abf9-2d93d7e3dd9c'), HumanMessage(content="Call your `human_input` tool to gather the user's input", additional_kwargs={}, response_metadata={}, id='a507d4c7-f5e0-49dd-a257-c35c55fce865')]}) ('values', {'messages': [SystemMessage(content='You are a helpful assistant.', additional_kwargs={}, response_metadata={}, id='e9037da1-32be-4929-abf9-2d93d7e3dd9c'), HumanMessage(content="Call your `human_input` tool to gather the user's input", additional_kwargs={}, response_metadata={}, id='a507d4c7-f5e0-49dd-a257-c35c55fce865'), AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_yjAuh1dXk6bv2ovejyuUdl1X', 'function': {'arguments': '{"input":"Please provide your input or question."}', 'name': 'human_input'}, 'type': 'function'}], 'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 21, 'prompt_tokens': 59, 'total_tokens': 80, 'completion_tokens_details': {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, 'prompt_tokens_details': {'audio_tokens': 0, 'cached_tokens': 0}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_34a54ae93c', 'id': 'chatcmpl-Bs9PTrBjCvT6S1GYwzxMnnrNOsrPl', 'service_tier': 'default', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run--77ee9c69-efde-4322-b3b1-8c5a83876f27-0', tool_calls=[{'name': 'human_input', 'args': {'input': 'Please provide your input or question.'}, 'id': 'call_yjAuh1dXk6bv2ovejyuUdl1X', 'type': 'tool_call'}], usage_metadata={'input_tokens': 59, 'output_tokens': 21, 'total_tokens': 80, 'input_token_details': {'audio': 0, 'cache_read': 0}, 'output_token_details': {'audio': 0, 'reasoning': 0}})]}) Requesting human input ('values', {'__interrupt__': (Interrupt(value='Please provide your input', resumable=True, ns=['tools:817a76e8-9620-8b68-e7af-3f339297705a']),)}) ```
Author
Owner

@sydney-runkle commented on GitHub (Jul 11, 2025):

Thanks for the report, we're looking into this!

@sydney-runkle commented on GitHub (Jul 11, 2025): Thanks for the report, we're looking into this!
Author
Owner

@nsgoneape commented on GitHub (Jul 24, 2025):

Yes I am dealing with a simmilar issue here

2025-07-25 00:22:08 | DEBUG    | determine_graph:_import_agent_module:26 - [determine_graph] importing module 'src.lib.agents.theblock_dario.agent'
2025-07-25 00:22:08 | ERROR    | determine_graph:get_graph_for_agent:124 - Failed to obtain graph for agent 0ae5092f-f448-48be-b7c4-c74041ad826f via 'src.lib.agents.theblock_dario.agent': Interrupt node `send_message_to_owners_negotiator_agent` not found
2025-07-25 00:22:08 | WARNING  | determine_graph:get_graph_for_agent:130 - Falling back to default get_graph()
2025-07-25 00:22:08 | DEBUG    | talk_service:talk_with_agent:162 - Using graph for agent 0ae5092f-f448-48be-b7c4-c74041ad826f
2025-07-25 00:22:08 | INFO     | request_logger:dispatch:57 - Request completed: POST /v1/talk/0ae5092f-f448-48be-b7c4-c74041ad826f/stream-to-app-user - 200 in 0.9822s
agent = create_react_agent(
    model=ChatOpenAI(model="gpt-4o-mini", api_key=server_config.OPENAI_API_KEY, temperature=0),
    checkpointer=AsyncMongoDBSaver(
        client,
        db_name=server_config.MONGO_DB,
    ),
    state_schema=CustomAgentState,
    tools=[
        upsert_service_entity,
        retrieve_my_service_entities,
        delete_service_entities,
        find_relevant_service_entities,
        send_message_to_other_liason_agent,
        send_message_to_owners_negotiator_agent,
        reply_to_agent,
        send_update_notification_to_user
    ],
    pre_model_hook=initiate_agent,
    prompt=prompt_for_agent,
    name="Dario",
    post_model_hook=clear_agent,
    interrupt_before=['send_message_to_owners_negotiator_agent'],
)

This is what documentation claims is expected:

interrupt_before	Optional[list[str]]	An optional list of node names to interrupt before. Should be one of the following: "agent", "tools". This is useful if you want to add a user confirmation or other interrupt before taking an action.	None

I am providing a tool to a create react agent → send_update_notification_to_user

@nsgoneape commented on GitHub (Jul 24, 2025): Yes I am dealing with a simmilar issue here ``` 2025-07-25 00:22:08 | DEBUG | determine_graph:_import_agent_module:26 - [determine_graph] importing module 'src.lib.agents.theblock_dario.agent' 2025-07-25 00:22:08 | ERROR | determine_graph:get_graph_for_agent:124 - Failed to obtain graph for agent 0ae5092f-f448-48be-b7c4-c74041ad826f via 'src.lib.agents.theblock_dario.agent': Interrupt node `send_message_to_owners_negotiator_agent` not found 2025-07-25 00:22:08 | WARNING | determine_graph:get_graph_for_agent:130 - Falling back to default get_graph() 2025-07-25 00:22:08 | DEBUG | talk_service:talk_with_agent:162 - Using graph for agent 0ae5092f-f448-48be-b7c4-c74041ad826f 2025-07-25 00:22:08 | INFO | request_logger:dispatch:57 - Request completed: POST /v1/talk/0ae5092f-f448-48be-b7c4-c74041ad826f/stream-to-app-user - 200 in 0.9822s ``` ``` agent = create_react_agent( model=ChatOpenAI(model="gpt-4o-mini", api_key=server_config.OPENAI_API_KEY, temperature=0), checkpointer=AsyncMongoDBSaver( client, db_name=server_config.MONGO_DB, ), state_schema=CustomAgentState, tools=[ upsert_service_entity, retrieve_my_service_entities, delete_service_entities, find_relevant_service_entities, send_message_to_other_liason_agent, send_message_to_owners_negotiator_agent, reply_to_agent, send_update_notification_to_user ], pre_model_hook=initiate_agent, prompt=prompt_for_agent, name="Dario", post_model_hook=clear_agent, interrupt_before=['send_message_to_owners_negotiator_agent'], ) ``` This is what documentation claims is expected: ``` interrupt_before Optional[list[str]] An optional list of node names to interrupt before. Should be one of the following: "agent", "tools". This is useful if you want to add a user confirmation or other interrupt before taking an action. None ``` --- I am providing a tool to a create react agent → send_update_notification_to_user
Author
Owner

@Fly-Playgroud commented on GitHub (Aug 3, 2025):

Is this any progress updated?

@Fly-Playgroud commented on GitHub (Aug 3, 2025): Is this any progress updated?
Author
Owner

@casparb commented on GitHub (Sep 14, 2025):

Hi @Fly-Playgroud @gcalabria @nsgoneape - sorry for the delay but have fixed this in https://github.com/langchain-ai/langgraph/pull/6141.

@casparb commented on GitHub (Sep 14, 2025): Hi @Fly-Playgroud @gcalabria @nsgoneape - sorry for the delay but have fixed this in https://github.com/langchain-ai/langgraph/pull/6141.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#782