Feature hasn't been suggested before.
Describe the enhancement you want to request
So currently in OpenCode TUI the way that a terminal can spawn is via a simple spawn() with piped stdio rather than a full PTY.
Some current issues:
- the default timeout is 2 minutes (this is not optimal for long running processes), the tool sends a
SIGTERM to a long running process which would kill it.
- the maximum output for terminals are 30,000 characters, some processes show a lot of loading characters that can fill up context
What I propose:
As I said in this thread, I think the bash/terminal management should be a suite of tools.
When a terminal process is initiated we can keep the timeout and character limit the same, but when the timeout is reached rather than sending a SIGTERM it will just move that terminal to a background terminal (accessable via some TUI keybind).
Then once a terminal has moved to the background the agent should have some tools like grep and executeCommandInTerminal so that it will not fill up a ton of context that isn't needed.
This would allow the agent to start/manage/modify/delete sessions a whole lot better than what it does currently. I think a POC might be achievable via a plugin but I want to see what others think of this and other points of view.
Feature hasn't been suggested before.
Describe the enhancement you want to request
So currently in OpenCode TUI the way that a terminal can spawn is via a simple
spawn()with piped stdio rather than a full PTY.Some current issues:
SIGTERMto a long running process which would kill it.What I propose:
As I said in this thread, I think the bash/terminal management should be a suite of tools.
When a terminal process is initiated we can keep the timeout and character limit the same, but when the timeout is reached rather than sending a
SIGTERMit will just move that terminal to a background terminal (accessable via some TUI keybind).Then once a terminal has moved to the background the agent should have some tools like
grepandexecuteCommandInTerminalso that it will not fill up a ton of context that isn't needed.This would allow the agent to start/manage/modify/delete sessions a whole lot better than what it does currently. I think a POC might be achievable via a plugin but I want to see what others think of this and other points of view.