alt.hn

4/8/2026 at 4:41:16 PM

Show HN: TUI-use: Let AI agents control interactive terminal programs

https://github.com/onesuper/tui-use

by dreamsome

4/8/2026 at 5:13:27 PM

Something something medical researcher reinvents calculus.

In 2026: frontend web developer reinvents tmux.

Guys, please do us the service of pre-filtering your crack token dreams by investigating the tool stack which is already available in the terminal ... or at least give us the courtesy of explaining why your vibecoded Greenspun's 10th something is a significant leg up on what already exists, and perhaps has existed for many years, (and is therefore, in the training set, and is therefore, probably going to work perfectly out of the box).

by mccoyb

4/8/2026 at 8:41:24 PM

The problem is, they'll find there is typically already a good solution to their problem, and then they'll have nothing to write about.

by nitwit005

4/8/2026 at 7:01:53 PM

Right, agents can just use tmux send-keys. Here's a skill I wrote to have Claude debug plugin code in the Helix editor's experimental plugin system. As usual, the skill is barely necessary, it just saves it some time getting the commands right and tells it where some useful reference material is.

https://github.com/david-crespo/dotfiles/blob/main/claude/sk...

by dcre

4/8/2026 at 5:52:47 PM

Maybe, just maybe, this is of obvious utility to the many people who have needs that are not yours?

I very regularly need to interact with my work through a python interpreter. My work is scientific programming. So the variables might be arrays with millions of elements. In order to debug, optimize, verify, or improve in any way my work, I cannot rely on any other methods than interacting with the code as it's being run, or while everything is still in memory. So if I want to really leverage LLMs, especially to allow them to work semi-autonomously, they must be able to do the same.

I'm not going to dump tens of GB of stuff to a log file or send it around via pipes or whatever. Why is there a nan in an array that is the product of many earlier steps in a code that took an hour to run? Why are certain data in a 200k-variable system of equations much harder to fit than others, and which equations are in tension with each other to prevent better convergence?

Are interpreters and pdb not great, previously-existing tools for this kind of work? Does a new tool that lets LLMs/agents use them actually represent some sort of hack job because better solutions have existed for years?

by cossatot

4/8/2026 at 7:12:32 PM

Are you aware that you can use tmux (or zellij, etc.), spin up the interpreter in a tmux session, and then the LLM can interact with it perfectly normally by using send-keys? And that this works quite well, because LLMs are trained on it? You just need to tell the LLM "I have ipython open in a tmux session named pythonrepl"

This is exactly how I do most of my data analysis work in Julia.

by SatvikBeri

4/8/2026 at 5:59:48 PM

See related sibling: the use cases are compelling!

My complaint is that tmux handles them perfectly. Exactly the claim that OP is making with their software - is served by robust 18 year old software.

In 2026, it costs nearly nothing to thoroughly and autonomously investigate related software — so yes I am going to be purposefully abrasive about it.

by mccoyb

4/8/2026 at 6:20:34 PM

And if you want to interact with tmux from within the python interpreter there is a very good library available, libtmux:

https://github.com/tmux-python/libtmux

by daveguy

4/8/2026 at 7:04:25 PM

What I do is have a quick command that spins up a worktree on a repo with my ghostty splits as I like them and the tmux named the worktree. I then tell the Claude code about the tmux when it needs to look. It’s pretty good at natively handling the tmux interactions.

Ideally Ghostty would offer primitives to launch splits but c’est la vie. Apple automation it is.

by arjie

4/8/2026 at 6:08:41 PM

> I'm not going to dump tens of GB of stuff to a log file

In the same vein as the parent comment, the curiosity is why you would vibe code a solution instead of reaching for grep.

by joshribakoff

4/8/2026 at 5:56:37 PM

You can start a tmux session and tell your agent about it and it will happily send commands and get the output from it.

I saw this post a while ago that turned me on to the idea: https://news.ycombinator.com/item?id=46570397

by hrimfaxi

4/8/2026 at 7:19:16 PM

I sincerely think the chatbot phenomena is giving people the perspective that whatever hallucinatory conversation they're having is profound because it's the first time they personally have thought about it.

On one hand this is normal in education and pedagogy to have the student or apprentice put the boring pieces together to find the wonder of the puzzle itself, but on the other this is how we end up with https://xkcd.com/927/

by reincarnate0x14

4/8/2026 at 5:23:51 PM

I agree. We skipped CLIs and went all the way to TUIs because TUIs are "easy to make now"? Or maybe because claude/codex?

But in practice you are padding token counts of agents reading streams of TUIs instead of leveraging standard unix pipes that have been around from day 1.

TLDR - your agent wants a CLI anyway.

Disclaimer: still a cool project and thank you to the author for sharing.

by dcchuck

4/8/2026 at 6:11:18 PM

The TUI makes more sense to humans who don’t understand the difference between a human and a machine.

by joshribakoff

4/8/2026 at 7:23:32 PM

I could make agents use delve (a go lang debugger) interactively, and it worked quite well specially when models weren't as good as they are now, they could choose where to put the breakpoint and inspect variables, I found that was the only way to unlock some situations when they insisted in that "it must be working", and it wasn't, I found that giving them the empirical tools to check for themselves was the only way to unstuck them.

Another use was for them to read the logs out of your development web server ( typical npm run dev, go run .)

I could do this with tmux send-keys and tmux capture-pane, you just need to organise the session, panes and windows and tell the agent where is what.

That was my first agent to tool communication experience, and it was cool.

After that I experimented with a agent to agent communication, and I would prompt to claude "after you finish ask @alex to review your code". In the CLAUDE.md file i'd explain that to talk to @alex you need to send the message using tmux send-keys to his tmux session, and to codex I'd say "when you received a review request from @claudia do .. such and such, and when you finish write her back the result of it" I added one more agent to coordinate a todo list, and send next tasks.

After that I got a bit carried away and wrote some code to organise things in matrix chat rooms, (because the mobile app just works with your server) and I was fascinated that they seem to be collaborating quite well (to some extend), but it didn't scale.

I abandoned the "project" because after all I found agents were getting better and better and implementing internal todo tasks, subagents ...etc plus some other tmux orchestrations tools appeared every other day.

I got fatigued of some many new ai things coming up, that and the end, I went back to just use iTerm, split panes, and manually coordinate things. Tabs for projects, panes for agents, no more than 2 agents per project ( max 3 for a side non conflicting task ) I think that is also what cognitively does not tire me.

My project name was cool though, tamex, as in tame tmux agents :)

And to comment on the submission, I think the idea has potential, I might give it a try, the key is to have low friction and require low cognitive load from the end user. I think that's why skills after all are the thing that is going to stick the most.

by alfonsodev

4/8/2026 at 7:59:08 PM

I thought Codex at least already can handle interactive sessions of programs, e.g. GDB.

by 6thbit

4/8/2026 at 5:20:27 PM

Maybe I'll use this to feed prompts into an interactive Claude session so I can use my max subscription instead of having to pay for API credits when using claude -p

by petcat

4/8/2026 at 4:56:49 PM

This is kind of fun, something I've been thinking about over the last couple days.

This is one area that makes me feel like our current LLM approach is just not quite general enough.

Yes, developers and power users love the command-line, because it is the most efficient way to accomplish many tasks. But it's rarely (never?) our only tool. We often reach for TUIs and GUIs.

It's why approaches like this get me excited: https://si.inc/posts/fdm1/

by wolttam

4/8/2026 at 5:17:24 PM

I've had my agents using tmux for these use cases for a couple years now. What does TUI-use offer on top?

by wild_egg

4/8/2026 at 6:43:24 PM

I've barely been using it lately, mostly leaving it disabled. But the tmux-mcp is pretty solid. https://github.com/nickgnd/tmux-mcp

I wish I was keeping better track of them all but there's a bunch of neat tmux based multi-agent systems. Agent of Empires for example has a ton of code around reading session data out of the various terminal uis. https://github.com/njbrake/agent-of-empires

Ideally imo tui apps also would have accessibility APIs. The structured view of those APIs feels like it would be nice to have. And it would mean that an agent could just use accessibility and hit both gui and tui. For example voxcode recent submission does this on mac for understanding what file is open/line numbers. https://github.com/jensneuse/voxcode https://news.ycombinator.com/item?id=47688582

by jauntywundrkind

4/8/2026 at 7:18:17 PM

Finally Claude Code can now control Claude Code

by flux3125

4/8/2026 at 7:43:05 PM

Does it work with any TUI?

by ofabioroma

4/8/2026 at 7:43:13 PM

Does it work on any TUI?

by ofabioroma

4/8/2026 at 6:36:45 PM

hehe, i made something similar for feedback loop on claude hooks. claude can open another claude instance in the testing folder, and check to see if the hooks fire properly

by 8note

4/8/2026 at 6:03:42 PM

Are they any good at nethack?

by mikkupikku

4/8/2026 at 6:09:24 PM

[dead]

by HannaCh_5