Skip to content

[BUG] !! direct-tool autocomplete shows Agent() with no arguments to pass #690

Closed

Description

@edenreich

Summary

When invoking a tool directly from chat with the !! prefix, the autocomplete for the Agent tool shows just Agent() with empty parentheses and the generic description "Execute Agent tool directly". It gives no indication of which arguments to pass, so the user has no idea how to call it.

(Screenshot from the reporter: input > !! Age, dropdown > Agent() | Execute Agent tool directly, with no arguments shown.)

Root cause: the !! template is built by generateToolTemplate (internal/ui/autocomplete/autocomplete.go:278), which fills the parentheses with only the tool's top-level required properties via extractRequiredArguments (:294, which reads params["required"]). The Agent tool's schema (internal/agent/tools/agent.go:106-138) has no top-level required array: it accepts either tasks (array) or description (shorthand) - a one-of - and the only required is nested under tasks.items (["description"]). So extractRequiredArguments returns nothing and the template is !!Agent(). The suggestion's Description is the generic "Execute tool directly" and its Usage is empty (:271-272), so no parameter names / types / descriptions are surfaced anywhere.

Net effect: for the Agent tool - and any tool whose useful arguments are not top-level required (one-of or all-optional schemas) - !! gives the user no clue what to type.

Steps to Reproduce

  1. Run infer chat.
  2. Type !! Age to trigger the direct-tool autocomplete.
  3. Observe the suggestion offered for the Agent tool.

Expected Behavior

The completion should surface the tool's arguments so the user knows what to pass - for example, insert a parameter skeleton like !!Agent(description="...") (or tasks=[...]), and/or list the parameters (name, type, required/optional, description) in the dropdown or a usage line. Tools with a one-of or all-optional schema should still show their meaningful arguments.

Actual Behavior

The dropdown shows Agent() with empty parentheses and "Execute Agent tool directly". No arguments are shown, so there is no guidance on how to call the tool.


Suggested direction: have generateToolTemplate / the suggestion builder include parameter hints beyond top-level required (fall back to top-level optional properties, and/or handle the one-of forms), and/or populate the Usage field (or a dropdown detail line) with the parameter list derived from the tool's schema.

Environment: macOS, infer chat TUI; model ollama_cloud/deepseek-v4-flash.

Activity

  1. added
    bug
    on Jun 30, 2026
  2. added theissue type on Jun 30, 2026
  3. moved this to Todo in 2026on Jun 30, 2026
  4. added a commit that references this issue on Jun 30, 2026
    655b2e4
  5. moved this from Todo to Done in 2026on Jun 30, 2026
  6. inference-gateway-releaser commented on Jun 30, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.126.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

    bugreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions