[FEATURE]: TUI - Search for and find string in session buffer #3098

Open
opened 2026-02-16 17:38:37 -05:00 by yindo · 16 comments
Owner

Originally created by @cwegener on GitHub (Nov 24, 2025).

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

Similar to how 'find' works in a text editor, I sometimes need to find a certain string in the agent's output.

This does not seem possible in the TUI at the moment.

Some possible inspirations to look at for designing such a feature:

  1. vim (both normal buffers and vim's terminal buffer)
  2. tmux

Also, ghostty community has had some interesting conversations about their design of the scrollback search feature: https://github.com/ghostty-org/ghostty/issues/189

Originally created by @cwegener on GitHub (Nov 24, 2025). ### 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 Similar to how 'find' works in a text editor, I sometimes need to find a certain string in the agent's output. This does not seem possible in the TUI at the moment. Some possible inspirations to look at for designing such a feature: 1. vim (both normal buffers and vim's terminal buffer) 2. tmux Also, ghostty community has had some interesting conversations about their design of the scrollback search feature: https://github.com/ghostty-org/ghostty/issues/189
yindo added the discussion label 2026-02-16 17:38:37 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 24, 2025):

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

  • #3361: Add Quick Session Search Interface (Ctrl+K) - Requests a search interface for sessions with real-time filtering, which is similar in concept to finding strings in output
  • #2755: Copy Mode for OpenCode - Requests vim/tmux-like copy mode with text selection and navigation, which would support finding and selecting specific text in the buffer

Feel free to ignore if your specific use case for searching agent output differs from these session/copy mode features.

@github-actions[bot] commented on GitHub (Nov 24, 2025): This issue might be a duplicate of existing issues. Please check: - #3361: Add Quick Session Search Interface (Ctrl+K) - Requests a search interface for sessions with real-time filtering, which is similar in concept to finding strings in output - #2755: Copy Mode for OpenCode - Requests vim/tmux-like copy mode with text selection and navigation, which would support finding and selecting specific text in the buffer Feel free to ignore if your specific use case for searching agent output differs from these session/copy mode features.
Author
Owner

@rekram1-node commented on GitHub (Nov 24, 2025):

good idea

@rekram1-node commented on GitHub (Nov 24, 2025): good idea
Author
Owner

@cwegener commented on GitHub (Nov 24, 2025):

good idea

I only just noticed it today for the first time that this is a functionality that would be useful. (And I've been using opencode for 2 months now)

The way I realized that I needed to find strings in the session's output buffer was because I was running opencode on a codebase that I am not extremely familiar with. And I was running the 'Plan' agent quite a lot to produce a lot of summaries to specific questions that I had about the code base (mostly architecture).

And when I went back to the historical session in the TUI on the next day, I wanted to check if some of the session output had already mentioned one particular method inside one of the codebase's modules I wanted to know more about.

My idea being, that if my previous session's context was already mentioning the name of the particular method I was after, I might just continue that same session and get a really good output in response. And otherwise I might start a new session ...

But I'm sure there are additional use cases for such find/search inside session buffer functionality.

@cwegener commented on GitHub (Nov 24, 2025): > good idea I only just noticed it today for the first time that this is a functionality that would be useful. (And I've been using opencode for 2 months now) The way I realized that I needed to find strings in the session's output buffer was because I was running opencode on a codebase that I am not extremely familiar with. And I was running the 'Plan' agent quite a lot to produce a lot of summaries to specific questions that I had about the code base (mostly architecture). And when I went back to the historical session in the TUI on the next day, I wanted to check if some of the session output had already mentioned one particular method inside one of the codebase's modules I wanted to know more about. My idea being, that if my previous session's context was already mentioning the name of the particular method I was after, I might just continue that same session and get a really good output in response. And otherwise I might start a new session ... But I'm sure there are additional use cases for such find/search inside session buffer functionality.
Author
Owner

@ariane-emory commented on GitHub (Nov 26, 2025):

Upvoting, I'd love to see this feature too.

@ariane-emory commented on GitHub (Nov 26, 2025): Upvoting, I'd love to see this feature too.
Author
Owner

@OpeOginni commented on GitHub (Nov 29, 2025):

Have a PR for something like this, any feedback?

https://github.com/user-attachments/assets/aee3ad80-7aff-4d24-b7f5-ab19d16a3174

@OpeOginni commented on GitHub (Nov 29, 2025): Have a PR for something like this, any feedback? https://github.com/user-attachments/assets/aee3ad80-7aff-4d24-b7f5-ab19d16a3174
Author
Owner

@rekram1-node commented on GitHub (Nov 29, 2025):

this is cool, Im not 100% sure if we wanna put it in the prompt box but this is very nice ill have david (our designer) take a look

@rekram1-node commented on GitHub (Nov 29, 2025): this is cool, Im not 100% sure if we wanna put it in the prompt box but this is very nice ill have david (our designer) take a look
Author
Owner

@xidiot commented on GitHub (Jan 19, 2026):

This is something I'm looking since day 1.

@xidiot commented on GitHub (Jan 19, 2026): This is something I'm looking since day 1.
Author
Owner

@unphased commented on GitHub (Jan 19, 2026):

I'm building a high scalability terminal recorder that will let me travel through time to solve this issue in general for terminals, but... it's not close to ready yet and it's also not quite the right hammer for this nail.

I must say it's rather appalling that this feature does not exist yet. I've been extremely impressed with opencode so far though. For example the syntax colorization of code diffs is chef's kiss:

Image
@unphased commented on GitHub (Jan 19, 2026): I'm building a high scalability terminal recorder that will let me travel through time to solve this issue in general for terminals, but... it's not close to ready yet and it's also not quite the right hammer for this nail. I must say it's rather appalling that this feature does not exist yet. I've been extremely impressed with opencode so far though. For example the syntax colorization of code diffs is *chef's kiss*: <img width="2016" height="1109" alt="Image" src="https://github.com/user-attachments/assets/43f0a548-2edf-4880-9b87-c3c88382b203" />
Author
Owner

@nesk commented on GitHub (Jan 20, 2026):

This would definitely be useful, I sometimes have to search for a specific a message in the session.

@nesk commented on GitHub (Jan 20, 2026): This would definitely be useful, I sometimes have to search for a specific a message in the session.
Author
Owner

@DebelToni commented on GitHub (Jan 30, 2026):

Get this merged to main ASAP. Any implementation is fine. BTW why does the TTI use the single windowed mode instead of continuing terminal flow so we can use tmux to find and to stuff?

@DebelToni commented on GitHub (Jan 30, 2026): Get this merged to main ASAP. Any implementation is fine. BTW why does the TTI use the single windowed mode instead of continuing terminal flow so we can use tmux to find and to stuff?
Author
Owner

@unphased commented on GitHub (Jan 31, 2026):

Because if you look at an implementation of a console that uses the scrollback, like codex, it's insanely easy to corrupt and garble the output and scrollback just by resizing your terminal. This way is better but IMO it should not have even shipped without a search feature...

@unphased commented on GitHub (Jan 31, 2026): Because if you look at an implementation of a console that uses the scrollback, like codex, it's insanely easy to corrupt and garble the output and scrollback just by resizing your terminal. This way is better but IMO it should not have even shipped without a search feature...
Author
Owner

@DebelToni commented on GitHub (Jan 31, 2026):

Because if you look at an implementation of a console that uses the scrollback, like codex, it's insanely easy to corrupt and garble the output and scrollback just by resizing your terminal. This way is better but IMO it should not have even shipped without a search feature...

You are completely right! Thanks. Until something is merged I use /export without saving and then find what I need in Neovim

@DebelToni commented on GitHub (Jan 31, 2026): > Because if you look at an implementation of a console that uses the scrollback, like codex, it's insanely easy to corrupt and garble the output and scrollback just by resizing your terminal. This way is better but IMO it should not have even shipped without a search feature... You are completely right! Thanks. Until something is merged I use /export without saving and then find what I need in Neovim
Author
Owner

@nesk commented on GitHub (Jan 31, 2026):

Until something is merged I use /export without saving and then find what I need in Neovim

Well, I'm embarrassed I've never thought about this workaround before. Thank you.

@nesk commented on GitHub (Jan 31, 2026): > Until something is merged I use /export without saving and then find what I need in Neovim Well, I'm embarrassed I've never thought about this workaround before. Thank you.
Author
Owner

@unphased commented on GitHub (Feb 1, 2026):

Thank you, knowing about /export helps me too.

@unphased commented on GitHub (Feb 1, 2026): Thank you, knowing about `/export` helps me too.
Author
Owner

@NamedIdentity commented on GitHub (Feb 7, 2026):

Maybe this is a newbie question, but has anyone tried just pointing Claude at the problem and letting it cook up a PR?

Am I missing something or is this not complicated now, compared to when it was proposed in November? Just give Claude the URL to this Issues request and say 'please fix'?

Or is this more complicated than that, and it needs the attention of experienced developers?

@NamedIdentity commented on GitHub (Feb 7, 2026): Maybe this is a newbie question, but has anyone tried just pointing Claude at the problem and letting it cook up a PR? Am I missing something or is this not complicated now, compared to when it was proposed in November? Just give Claude the URL to this Issues request and say 'please fix'? Or is this more complicated than that, and it needs the attention of experienced developers?
Author
Owner

@NamedIdentity commented on GitHub (Feb 7, 2026):

I think this feature should make sure it is compatible with https://github.com/anomalyco/opencode/pull/8535 , which enables pagination so that long sessions can be viewed from the beginning to end.

@NamedIdentity commented on GitHub (Feb 7, 2026): I think this feature should make sure it is compatible with https://github.com/anomalyco/opencode/pull/8535 , which enables pagination so that long sessions can be viewed from the beginning to end.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3098