Skip to content

[FEATURE]: Better active/background terminal and bash management #6375

Description

@R44VC0RP

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

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.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Dec 29, 2025
  2. github-actions commented on Dec 29, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. Techie5879 commented on Feb 9, 2026

    @Techie5879

    Codex now has background terminals with polling and I can indeed confirm that it has been very useful for long running tasks whereazs opencode has to terminate and rerun with a longer timeout (unless I remember to tell it that this is going to be a long running thing)

  4. github-actions commented on Apr 11, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  5. LPFchan commented on May 1, 2026

    @LPFchan

    this would be very nice to see. it's probably one (and only) thing i miss coming from cc/codex!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions