[FEATURE]: Python tool #9423

Open
opened 2026-02-16 18:12:25 -05:00 by yindo · 2 comments
Owner

Originally created by @demostanis on GitHub (Feb 15, 2026).

Originally assigned to: @R44VC0RP on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I was wondering whether adding a Python code execution tool would be a good idea.

I'm using some agents skills from Anthropic and they mention Python a lot (e.g. https://github.com/anthropics/skills/blob/main/skills/pdf/SKILL.md).
When the LLM tries to execute Python, it tries to create a venv, install packages there, and when executing code with python3 <file> there's a bunch of import errors from the LSP because pyright doesn't run inside the new venv.

A Python tool could accept a list of packages to install (e.g. with uv run --with), and the code could be executed without even needing a file (by specifying - to the uv run command).
I tried to vibecode a plugin but it seemed like there was no way of getting the output of the python execution printed inside the OpenCode TUI (like what the bash tool does).

Feedback on this idea would be much appreciated.

Originally created by @demostanis on GitHub (Feb 15, 2026). Originally assigned to: @R44VC0RP on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I was wondering whether adding a Python code execution tool would be a good idea. I'm using some agents skills from Anthropic and they mention Python a lot (e.g. https://github.com/anthropics/skills/blob/main/skills/pdf/SKILL.md). When the LLM tries to execute Python, it tries to create a venv, install packages there, and when executing code with `python3 <file>` there's a bunch of import errors from the LSP because pyright doesn't run inside the new venv. A Python tool could accept a list of packages to install (e.g. with `uv run --with`), and the code could be executed without even needing a file (by specifying `-` to the uv run command). I tried to vibecode a plugin but it seemed like there was no way of getting the output of the python execution printed inside the OpenCode TUI (like what the bash tool does). Feedback on this idea would be much appreciated.
yindo added the discussion label 2026-02-16 18:12:25 -05:00
Author
Owner

@R44VC0RP commented on GitHub (Feb 15, 2026):

This is a good idea but I don't think that it would require a dedicated tool for running python. This is probably a job for a plugin.

@R44VC0RP commented on GitHub (Feb 15, 2026): This is a good idea but I don't think that it would require a dedicated tool for running python. This is probably a job for a plugin.
Author
Owner

@demostanis commented on GitHub (Feb 15, 2026):

This is a good idea but I don't think that it would require a dedicated tool for running python. This is probably a job for a plugin.

Thanks for your feedback, that's what I thought.

Is there a way to mimicate the Bash tool in a plugin so that I can see the Python execution stdout/stderr from the OpenCode TUI?

@demostanis commented on GitHub (Feb 15, 2026): > This is a good idea but I don't think that it would require a dedicated tool for running python. This is probably a job for a plugin. Thanks for your feedback, that's what I thought. Is there a way to mimicate the Bash tool in a plugin so that I can see the Python execution stdout/stderr from the OpenCode TUI?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9423