Skip to content

🐛 Bug: Tool calls stuck in executing with langgraph.js #1982

Closed

Description

@GigaDroid

♻️ Reproduction Steps

Create a graph using langgraph.js including a tool node. Bind tools to the llm and let the llm execute it.

Implement useCopilotAction like this

useCopilotAction({
			name: "tool",
			available: "disabled", // Don't allow direct invocation
			render: ({ name, args, status, result }: CatchAllActionRenderProps<[]>) => {
return <div>status</div>
}

✅ Expected Behavior

The tool call is rendered in the chat and the status is "complete" after execution finishes

❌ Actual Behavior

The tool call is rendered in the chat, first with status "inProgress", then with status "executing"

𝌚 CopilotKit Version

Copilotkit: 1.8.14
Langgraph.js: 0.3.0

📄 Logs (Optional)

Activity

  1. added
    bug
    on Jun 13, 2025
  2. copilotkit-support commented on Jun 13, 2025

    @copilotkit-support
    Contributor
  3. inno-odyssean commented on Aug 2, 2025

    @inno-odyssean

    having same issue using python

  4. added and removed
    bug
    on Aug 27, 2025
  5. added
    bug
    and removed on Jul 20, 2026
  6. BenTaylorDev commented on Jul 21, 2026

    @BenTaylorDev
    Contributor

    👋 Triage sweep. Since this was filed, the LangGraph integration was rewritten onto AG-UI. The old node-boundary buffering (StreamingStateExtractor) that held tool calls "in executing" is gone; @ag-ui/langgraph now emits a TOOL_CALL_RESULT per tool at OnToolEnd, which drives the frontend action to complete. Could you retest on the current release (1.63.x)? We'll close as stale in ~2 weeks otherwise. (Companion of #2051 — same root cause, Python variant.)

  7. linear-code commented on Aug 11, 2026

    @linear-code
  8. BenTaylorDev commented on Aug 11, 2026

    @BenTaylorDev
    Contributor

    Verified fixed — closing.

    I reproduced the reported sequence against the current pipeline and the tool call now reaches complete with its result mid-run, before RUN_FINISHED:

    • The AG-UI LangGraph adapter emits TOOL_CALL_RESULT at OnToolEnd (integrations/langgraph/typescript/src/agent.ts; same in the Python adapter), rather than withholding it to a node/graph boundary as the old StreamingStateExtractor path did.
    • The frontend derives status purely from whether a role: "tool" message with a matching toolCallId exists, so the result landing mid-run flips the render to complete immediately.
    • useCopilotAction({ available: "disabled" }) — your config — is now a thin shim over the same render registration, so this holds on both the v1 and v2 render paths.

    As a control, suppressing the mid-run result reproduces your exact symptom (inProgress, empty result), which is what the old buffering did.

    One caveat worth flagging for anyone finding this later: if a single assistant message carries parallel tool calls, the v1 render path currently shows only the first one. That's a separate defect from what you reported and it's tracked separately — see #2051. If you're still seeing a stuck status on a current release with a single tool call, comment here and I'll reopen.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions