Skip to content

Python install offered in irrelevant case #25644

Closed

Description

I got this tool request:

Image

when working in https://github.com/jrieken/v8-inspect-profiler. This is not a Python project, has no Python files, and I didn't do anything to set up a Python environment. I would expect Python tools are not added to the agent in this case.

Activity

  1. DonJayamanne commented on Aug 6, 2025

    @DonJayamanne

    I think the root case here is the fact taht Python extension has been activated in this workspace and thus contributes tools.

    has no Python files, and I didn't do anything to set up a Python environment. I would expect Python tools are not added to the agent in this case.

  2. karthiknadig commented on Aug 6, 2025

    @karthiknadig
    Member

    Can you share extension host logs? It should show why the extension activated.

  3. connor4312 commented on Aug 6, 2025

    @connor4312
    MemberAuthor

    The activation reason is onLanguageModelTool:install_python_packages

  4. DonJayamanne commented on Aug 6, 2025

    @DonJayamanne

    Model doing the wrong thing here,
    I would have thought the name if the tool was a good enough clue as to what it’s for

    Not sure what we can do here, apart from improving tool descriptions

  5. DonJayamanne commented on Aug 6, 2025

    @DonJayamanne

    What model are you using?

  6. connor4312 commented on Aug 6, 2025

    @connor4312
    MemberAuthor

    But the tool shouldn't have been present at all for my project which has no Python and nothing to do with Python, right? Tool limits are a thing and having more tools, even if unused, degrades the model's tool calling accuracy--as seen here.

    This was with GPT-4.1

  7. DonJayamanne commented on Aug 6, 2025

    @DonJayamanne

    Tool limits are a thing and having more tools, even if unused, degrades the model's tool calling accuracy--as seen here.

    I don't think we have a way to dynamically include tools without activating the extension.
    I.e. if we had a when clause then what code will update the context variables.
    If you think this is definitely possible please do share some information.

    Also from what I recall having when clauses in tools doesn't work well, we did try this for notebook in the past and it didn't work.
    & the plan was to only include/exclude tools via code.
    roblourens might have more thoughts on this.

  8. connor4312 commented on Aug 6, 2025

    @connor4312
    MemberAuthor

    Tools do support when clauses. If you run into problems with it please open an issue so we can get it fixed.

  9. added
    bugIssue identified by VS Code Team member as probable bug
    needs PRReady to be worked on
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunities

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions