Doubt - Agent not completing all TODO's before giving answer #24

Closed
opened 2026-02-16 08:19:28 -05:00 by yindo · 1 comment
Owner

Originally created by @AlterHoodie on GitHub (Aug 21, 2025).

Facing a simple problem, where agent does not complete all todo's before it gives the final answer, maybe iam missing some config parameter or the way iam invoking the graph might be wrong

async def build_graph():
    agent = ChatOpenAI(model="gpt-4.1", temperature=1, api_key=os.getenv("OPENAI_API_KEY"))
    graph = create_deep_agent(
        tools = [internet_search],
        instructions = RESEARCH_PROMPT,
        model = agent
    ).with_config({"recursion_limit":1000})
    return graph

Above code snippet is almost the same as in the example.py

Originally created by @AlterHoodie on GitHub (Aug 21, 2025). Facing a simple problem, where agent does not complete all todo's before it gives the final answer, maybe iam missing some config parameter or the way iam invoking the graph might be wrong ```python async def build_graph(): agent = ChatOpenAI(model="gpt-4.1", temperature=1, api_key=os.getenv("OPENAI_API_KEY")) graph = create_deep_agent( tools = [internet_search], instructions = RESEARCH_PROMPT, model = agent ).with_config({"recursion_limit":1000}) return graph ``` Above code snippet is almost the same as in the example.py
yindo closed this issue 2026-02-16 08:19:28 -05:00
Author
Owner

@namtran6701 commented on GitHub (Aug 21, 2025):

same thing happened to me when using gpt-4.1. It worked after I switched to claude 4 sonnet

@namtran6701 commented on GitHub (Aug 21, 2025): same thing happened to me when using gpt-4.1. It worked after I switched to claude 4 sonnet
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagents#24