Skip to content
TheChatArchiveThe Chat Archive
gpt-5.6-sol· openaiHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Subagent toolcalls not handled when using LiteLLM proxy Summary When using cagent with a…

  1. User

    Subagent tool_calls not handled when using LiteLLM proxy

    Summary

    When using cagent with a LiteLLM proxy (OpenAI-compatible API), a subagent can return a valid tool_calls response, but the host agent reports “no response from subagent” and does not execute the tool call.

    Environment

    • cagent: v1.19.7
    • OS: Linux (WSL2) x86_64
    • LLM: gemini-pro via LiteLLM proxy (OpenAI-compatible)

    Expected

    Host agent receives the subagent response and executes the tool call(s), then continues the conversation with the tool result.

    Actual

    Host agent reports there is “no response from subagent” even though the subagent response contains a valid tool_calls entry. The requested tool call is not executed.

    Minimal reproduction

    1. Configure cagent to use LiteLLM as the model provider (OpenAI-compatible API).
    2. Run a workflow where the subagent is asked to use tools.
    3. The subagent returns a tool call (e.g., company_search with JSON arguments) and finishes with finish_reason: "stop".
    4. The host agent logs “no response from subagent” and does not invoke the tool.

    Notes

    • The subagent response includes a valid tool call object (type: function, name: company_search, arguments: {"datasources": ["confluence", "github", "gdrive"], "query": "LiteLLM usage teams integrations standards"}).
    • I can reproduce consistently with LiteLLM as the proxy in front of an OpenAI-compatible endpoint.

    Please let me know if you want a sanitized example payload or a minimal agent config.

    Interface

    No new interfaces are introduced.

  2. Assistant

    I’ll trace the OpenAI-compatible response conversion and subagent execution path, add a focused regression test for tool_calls paired with finish_reason: "stop", then run the project validation commands.

  3. Assistant

    rg isn’t installed in this checkout, so I’m falling back to repository-local grep/find searches and narrowing from the relevant message text.

  4. Assistant

    The failure is in stream aggregation: it returns as soon as it sees finish_reason: "stop" before reading tool calls carried in that same chunk. LiteLLM can legally co-locate both fields, so I’m changing the ordering to aggregate the delta first and then finalize the stream.

  5. Assistant

    The regression test exercises the full runtime: a single LiteLLM-style chunk contains both the complete company_search call and "stop", the handler must run, and the model must receive the tool result and produce its follow-up response. Dependencies are being populated for the focused test run.

  6. Assistant

    The first compile attempt hit the container’s process limit (fork/exec … resource temporarily unavailable) while Go built dependencies in parallel, not a code failure. I’m rerunning with serialized package compilation, then I’ll run the prescribed build/test/lint checks with constrained parallelism if needed.

  7. Assistant

    The serialized focused test is still compiling the large runtime dependency graph; it has produced no errors so far. The implementation change is deliberately scoped to chunk ordering and preserves the existing behavior for separately streamed tool-call and finish chunks.

  8. Assistant

    The focused regression now passes. I’ve also confirmed the diff is limited to the stream aggregator and one end-to-end runtime test; next are the repository-required task build, task test, and task lint validations.

  9. Assistant

    The repository’s task runner is not installed in this environment. I’ll mirror the commands defined in the Taskfile directly so build, tests, and lint still receive equivalent coverage, and I’ll report the runner limitation explicitly.

  10. Assistant

    Build has passed, and the full test suite is progressing successfully through the CLI, E2E, and example packages. I’m keeping Go package concurrency at one only to avoid the environment’s process ceiling.

  11. Assistant

    The full suite has exposed unrelated environment/baseline failures in config example model resolution, hook shell behavior, and an invalid-path SQLite expectation. The runtime package and new regression remain green; I’m letting the suite finish to capture the complete result before linting.

  12. Assistant

    The full suite is near completion. Its failures are pre-existing/environment-sensitive categories (obsolete example model IDs, root-user permission checks, and shell-hook behavior); the affected runtime package also has unrelated full-package failures, so I’ll isolate and rerun the changed regression once more after the suite completes.

  13. Assistant

    The final regression is also being checked under Go’s race detector because the test verifies actual asynchronous tool execution. Lint’s repository-specific checks and module tidiness have passed; the only unavailable lint component is the missing golangci-lint binary.

  14. Assistant

    The race-enabled build is taking substantially longer than the normal build due to instrumenting the runtime’s dependency graph, but it remains active with no diagnostics. The ordinary focused regression and production build have already passed.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.