flaky-engineer-19286
12/02/2025, 5:22 AMflaky-engineer-19286
12/02/2025, 5:41 AMlimited-student-10747
12/02/2025, 11:55 AMflaky-engineer-19286
12/04/2025, 11:05 AMTerminalExecutor. However, for cases like
rg -l "TODO" . > ripgrep_result.txt
or a pipeline like
my_custom_tool xxx | grep "" > result.txt # keeping this in a local file since it is relatively large.
Merely wrapping a CLI tool and execute its args in the TerminalExecutor is not sufficient.flaky-engineer-19286
12/04/2025, 11:11 AMTerminal tool and pass in corresponding args.
Then, these virtual tool calls could be surfaced explicitly, instead of being mixed in with other generic terminal commands.
Do you think a feature like this would make sense?
If this sounds like a feature worth exploring, I’d be more than happy to help implement it or contribute a PR.limited-student-10747
12/04/2025, 1:54 PMThen, these virtual tool calls could be surfaced explicitlyTo clarify, how would you actually do this? And would this only be a difference of how it looks in the interface? Or would there be some other difference from how it’s used in the actual agent?
flaky-engineer-19286
12/04/2025, 2:21 PMstderr: "This tool can only be called in a terminal" so the agent can correct itself.
So in that sense, the agent logic stays essentially the same — we’re just giving it one more CLI capability that it’s aware of, plus a clear error signal if it uses it incorrectly.
On the UI side, the idea would be:
• when the terminal tool runs a command that includes one of these “virtual tools” in the command line, the UI could detect that and surface it as a call to the corresponding virtual tool, instead of showing it as a generic terminal command.
This is roughly what I was thinking. I’m not sure if this fits well with the current design philosophy of openhands, so I’d really appreciate your thoughts or suggestions on whether this makes sense, or if there’s a better way to achieve something similar.flaky-engineer-19286
12/04/2025, 2:30 PMTerminalTool could expose a helper like:
TerminalTool.extend_cli_tool(
tool_handle="custom_tool",
description="..."
)
Internally, this would just update the description of the terminal tool by appending a section like:
### Other CLI tools
#### custom_tool
...
That way, the agent still only sees a single terminal tool, but it is explicitly informed about additional CLI capabilities and how to use them. This feels like a relatively lightweight and efficient approach to melimited-student-10747
12/04/2025, 2:32 PMflaky-engineer-19286
12/04/2025, 2:41 PM