Skip to content

[BUG] Duplicate tools added during agent preparation #668

@marinoska

Description

@marinoska

Describe the bug

When preparing agent execution, both static and dynamic tools are merged and passed to toolManager.prepareToolsForGeneration. This causes each tool (e.g., getWeather) to appear twice, since dynamic clones are added even for non-dynamic tools.

Steps To Reproduce

debug with-hooks example, for instance

Expected behavior

Only dynamic tools should be passed to prepareToolsForGeneration

Packages

  • @voltagent/core

Additional Context

agent.ts → prepareExecution() and prepareTools()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions