Skip to content

Extension API: expose active tools as executable objects, not just names #5781

@pandysp

Description

@pandysp

What do you want to change?

Add getActiveExecutableTools(): AgentTool[] to the extension API, the counterpart of getActiveTools() (which returns only names). A shallow copy of the live active set.

Why?

I'm building an extension that runs observers alongside the agent. Each forks the live session as the agent works and can act with the agent's own tools.

In my extension the observers fork the live session (vs. subagents that have full toolset in their own sessions), and I want them to use the tools from that main session. I can register new tools and list the active ones by name, but there's no runnable handle to them, so an observer can see a tool and still not run it.

How? (optional)

Return agent.state.tools.slice() (the active set, so built-ins are included), wired alongside getActiveTools. Implemented locally with a test, happy to PR if approved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions