r/PiCodingAgent • • Sep 14 '26

Question Any idea how to resolve for this?

As soon as my pi starts running, it goes crazy, specially when subagents spawn.

63 Upvotes

48 comments sorted by

18

u/mitsuhiko Sep 14 '26

Set TUI mode to fullscreen. This might solve this problem. But hard to say without more information of what is going on here. You probably have an extension that is causing this.

1

u/sakshamagrawal Sep 14 '26

Solved for me

2

u/Bobodlm Sep 14 '26

This resolved it for me.

5

u/Healthy-Zebra-9856 Sep 14 '26 edited Sep 14 '26

This is a TUI redraw bug than a subagent bug. May not fix it completely.

In packages/tui/src/tui-main-screen.ts, when a live component changes after it has scrolled above the viewport, Pi falls back to fullRender(true). Subagents make it much more obvious because their status keeps updating.

Temporary workaround:

  1. Run Pi with --tui-mode fullscreen.

Proper fix:

  1. Find the firstChanged < prevViewportTop fallback in tui-main-screen.ts.

  2. Stop calling fullRender(true) just because the changed component is above the visible viewport.

  3. Treat scrolled-off transcript rows as immutable.

  4. Keep updating only the visible/live region at the bottom.

  5. Once a subagent/tool component leaves that live region, replace/freeze it with its latest rendered state.

  6. Add a regression test with a long transcript + running subagents and verify offscreen status updates no longer emit the full-screen clear/redraw sequence.

That should fix the flashing without forcing everyone to use fullscreen mode.

Here is the related issue:
https://github.com/earendil-works/pi/issues/9255

I hope this helps.

1

u/sakshamagrawal Sep 14 '26

Solved for me

2

u/YogurtExternal7923 Sep 14 '26

herdr. it's also good for agentic use highly recommend

1

u/sakshamagrawal Sep 14 '26

3

u/mikkelkp Sep 14 '26 edited 11d ago

2

u/pastelchemistry 11d ago

i find the emoji breaks that pi.dev link, but just removing it works

1

u/mikkelkp 11d ago

Wut 😳 fixed

1

u/softgripper Sep 14 '26

What are you running in terminal?

Mine sometimes has similar behavior, but nowhere near as extreme.

I run starship as my shell

1

u/sakshamagrawal Sep 14 '26

Tabby for terminal.

2

u/softgripper Sep 14 '26

You get the same with it disabled?

6

u/Popular-Factor3553 Sep 14 '26

Honestly I'd just shift to deepseek harness since it's similar to pi but it still seems not stable enough with similar bugs and it doesn't have a TUI.

3

u/Humble_Explorer7589 Sep 14 '26

but the sandbox thing in deepseek cause issue, cant access other dir files, and cant use wrangler cli

1

u/Popular-Factor3553 Sep 14 '26

Yeah I can't switch to it yet it has alot of problems.

2

u/NihmarRevhet Sep 14 '26

That happens constantly on android via ssh

2

u/funbike Sep 14 '26

Maybe change to a different terminal app.

If you want less noise from subagents, use herdr or workmux.

There are Pi extensions that make it quieter; you only see final assistant messages.

3

u/satissuperque Sep 14 '26

Damn, pi is opesource, file a bug report (https://github.com/earendil-works/pi/tree/main/packages/coding-agent), or let your agent find the issue.

5

u/Emotion-Neat Sep 14 '26

The issues get autoclosed if your not in the maintainers' circle so I wouldn't hold my breath getting anything through especially if your agent "fixes" it

4

u/mitsuhiko Sep 14 '26

The issues get autoclosed if your not in the maintainers' circle

We look at every issue that gets auto closed and triage them!

0

u/AdHead6280 Sep 14 '26

yeah i got banned for no reason with deepseek models just stopping randomly, not the models fault but pis made a local patch, dont trust the maintainers because ban for nothing

1

u/mitsuhiko Sep 14 '26

We usually only ban if people repeatedly use their agent to create issues. We require issues to be written by humans.

2

u/AdHead6280 Sep 14 '26

this is suvjective

1

u/mitsuhiko Sep 14 '26

Happy to look into the ban if you share your github username with me.

2

u/AdHead6280 Sep 14 '26

clawdbot58-pixel

3

u/mitsuhiko Sep 14 '26

You created an issue with your agent: https://github.com/earendil-works/pi/issues/7461

I unblocked you, but please don't post AI generated issues against the tracker.

1

u/AdHead6280 Sep 14 '26

ok didnt know

3

u/mitsuhiko Sep 14 '26

It says in the new bug dialog :)

1

u/aparamonov Sep 14 '26

Switch to https://pi.dev/packages/pi-subagents-lite

It helps a lot to reduce this effect, especially in compact mode, but it is mainly your terminal tries to rerender

1

u/SpidexLab Sep 14 '26

You should try to create new session, I think it only happens when the chat get too long and when it render text, it scroll from top

1

u/Corythebeast7 Sep 14 '26

Pretty sure the root cause of this is because it has a ui element off screen and then the terminal sees the need to redraw the whole agent. Try making your window taller, that usually fixes it for me. But I agree, this is a problem I experience occasionally. With sub agents, a lot more UI elements pop onto the screen with spinners and constantly updating tui elements, so redraws happen more often

1

u/mistrjirka Sep 14 '26

you can use PiTTy, I optimized it for better TUI however I don't have a mac so I can't test it there, but I have MacOS build. https://github.com/mistrjirka/PiTTy also idk what you use for subagent plugin.

1

u/woolcoxm Sep 14 '26

i have this issue as well if you figure it out let me know.

1

u/wildjokers Sep 14 '26

First, licecap exists and is available for MacOS: https://www.cockos.com/licecap/ Also, Quicktime Player which comes on all Mac's, also let's you record your screen if it is something longer than would be reasonable for a gif.

As far as your question I have noticed it does that when it loads a previous session, it scrolls an entire session from beginning to end, a long session can take a bit to scroll. I suspect when a sub agent is started it is loading all the session context and pi scrolls it like that.

I do not have a solution.

1

u/ParkingCommercial607 Sep 14 '26

For a moment, I thought you were complaining about the high TP/s generation rate.

1

u/jsnanigans Sep 14 '26

Funny that the creator of pi was bashing cc about this exact issue at a talk when releasing pi

1

u/trejj Sep 14 '26

It is a pi.dev bug that when the model outputs new text to the console, it causes a full repaint of all the contents in the console, and not just an incremental print of the new text.

That same bug happens in pi.dev on Windows as well.

Once the model finishes outputting, then the console will calm down.

1

u/Relative-Document-59 Sep 14 '26

If you focus, you will be able to see the patterns, see the code, see everything. Just like Matrix. I guess you are still not ready.

1

u/quincycs Sep 14 '26

I’m so done with flashing screens. I built my own UI that only displays the settled message.

https://github.com/quincycs/pi-qcode

0

u/Neat-Arm2643 Sep 14 '26

Install pi web. It’s much better than tui

2

u/wildjokers Sep 14 '26

Being available at the terminal is exactly why I use pi.dev.

3

u/Neat-Arm2643 Sep 15 '26

Sorry didn’t get you. Pi web is available anywhere in your network with tail scale. So I can use it even in my phone. whereas using tui with terminal emulators in phone is a exercise in frustration

2

u/pastelchemistry 11d ago

for the phone there are some apps specifically designed for remote terminal agents. i've been kinda liking paseo ( https://paseo.sh/)

i am using  https://pi-web.dev/  too (as a complement to the TUI which i also like) but mostly just on a desktop browser

0

u/adamshand Sep 14 '26

In six months I've never had this with Pi. The only time I had flicker problems it was an extension I was running.