piagent_
← /news
Nov 16, 2026community

petrroll lands eleven pi fixes in under three hours: Codex sessions recover from the 60-minute websocket limit, fullscreen scrolling stops rebuilding the transcript, model fallback warnings reach every mode

Pi merged eleven pull requests on November 16, every one a fix, every one authored by petrroll, all within just under three hours — after two completely quiet days. The tally since v1.5.0 shipped on November 2 stands at 135: eighty-nine already inside v1.5.1 and v1.5.2, 46 waiting on main. Every one of the eleven documents its change; the behavior notes below are written from those bodies, and the counts come from the merged-pulls search behind the source link.

Five of the eleven wind down the terminal-hygiene sweep around #11264, the issue behind model-scope warnings printing over the fullscreen UI. The most visible, #12236, stops git and npm from writing across the interface while pi installs packages: DefaultPackageManager.runCommand() spawned both with stdio: "inherit", so a /reload after adding a package to settings, a /resume into a project with uninstalled packages, or any session replacement carrying temporary -e git: or -e npm: packages printed Cloning into ..., Resolving deltas: 100% (3/3), done., npm summaries and warnings straight over the TUI. Output is captured now: a failing command’s stdout and stderr land in the error, resolve() announces an install, and git runs with GIT_TERMINAL_PROMPT=0 and ssh with BatchMode, so an interactive password prompt fails with a credentials hint instead of hijacking the screen — credential helpers and ssh agents keep working. In the PR’s tmux verification, startup with git:github.com/octocat/Spoon-Knife prints only Installing git:github.com/octocat/Spoon-Knife... before the TUI takes over, and a failed install surfaces under [Extension issues] with git’s own output attached.

Two more make sure what the runtime learns reaches the user. #12115 stops pi from discarding diagnostics that appear on a session replacement: the runtime factory returns settings errors, project-trust warnings, extension load errors and warnings, session option warnings and — since #11973 — model scope warnings, but only main.ts read the list, once at startup, so a bad models pattern added mid-session warned nobody. Diagnostics now survive /new, /resume, /fork and their RPC equivalents — in the chat in interactive mode (Warning: No models match pattern "github-copilot/nope" above New session started), on stderr in print, JSON and RPC modes, shown once and not repeated; /reload is unaffected because it creates no new runtime. #12234 extends the same reporting to model fallback: when a resumed or forked session’s model no longer exists or has no login, createAgentSession() falls back and sets a modelFallbackMessage such as Could not restore model gone/missing-model. Using fake/fake-model, but only interactive startup ever displayed it — /resume and /fork switched models without notice, and print, JSON and RPC never saw it at all. The message now travels as a runtime diagnostic, so #12115’s reporting surfaces it in every mode at startup and after each replacement; the no-models-at-all case (No models available. Use /login...) is unchanged — interactive still shows it at startup and the other modes still exit with it — and #12234 also deletes the caller-less warnDeprecation() in utils/deprecation.ts.

#12233 brings the shared pi.events bus under the same error reporting as ordinary extension handlers. Handlers registered through pi.on() already had their exceptions caught and shown as extension errors in every mode; handlers on the bus got nothing but a console.error in core/event-bus.ts, which in interactive mode writes behind the TUI’s back and corrupts the screen. A throwing bus handler now reaches the extension runner’s onError — interactive mode shows Extension "<path>" error: demo handler failed with its stack in the chat, and the screen stays clean. The bus keeps its own console.error only for subscribers that bypass pi.events, which only SDK hosts calling eventBus.on() directly can create. #12117 removes the two direct writes the sweep’s review still found: parseChangelog() — which reads pi’s own and extension packages’ changelogs for startup notes and for /changelog — no longer prints Warning: Could not parse changelog when the file exists but cannot be read, returning no entries so /changelog shows No changelog entries found., and restoreModelFromSession() in core/model-resolver.ts, a printer with no callers anywhere in the repo, is deleted.

Three fixes straighten out the session lifecycle’s events across modes. #12230 (closing #10470) stops RPC mode from running extension session_start — and resources_discover — handlers twice on new_session, switch_session, fork and clone: an extension that starts a timer in session_start and clears it in session_shutdown leaked one timer per replacement, and pi.appendEntry() wrote its entry twice. Four handler-side rebindSession() calls are gone — the runtime callback is now the only rebind — and RPC subscribes to session events before bindExtensions(), so clients also receive what the startup session_start emits. #12231 fixes the SDK face of the same event: AgentSession.reload() emitted session_shutdown to the old extensions but gated session_start on the host having set a UI context, command actions, a shutdown handler or an error listener, so a host calling bindExtensions({}) — as the SDK’s 13-session-runtime example and the docs/sdk.md MCP guidance do — reloaded extensions that were never started. The MCP extension, for one, does not reconnect its servers after a reload. bindExtensions() now records that it ran, and reload() emits session_start, with MCP reporting and resource discovery, whenever it did; hosts that never call bindExtensions() behave as before. #12232 closes the same ordering gap #12230 closed for RPC, in JSON print mode: runPrintMode() subscribed to session events only after bindExtensions(), so anything a session_start handler emitted — entry_appended from pi.appendEntry() among it — never reached --mode json output; the subscription now precedes the bind, with the JSON session header still first in the stream.

#12229 (closing #12124) teaches pi’s retry logic the Codex backend’s 60-minute websocket limit. The Codex backend closes the Responses WebSocket after an hour with Responses websocket connection limit reached (60 minutes). Create a new websocket connection to continue., and until now the provider reconnected only when the limit hit before the first event — once anything had streamed, the reconnect was skipped on purpose, because the partial output had already been pushed to the stream. The limit’s message and code are retryable now: retryAssistantCall opens a second, fresh socket — the first closed, no previous_response_id, no SSE fallback — and the turn completes instead of failing into a manual continue that started the whole response over. The fix’s first commit comes from shenmuegit’s fork, and the socket age above which requests stop reusing a cached socket drops from 55 to 45 minutes. Per the PR, one gap remains: a single response that itself runs longer than 60 minutes hits the limit on every retry until the retry budget runs out.

#11968 makes fullscreen scrolling O(viewport). Fullscreen pi draws its own scrolling, and every wheel event — up to 60 frames per second — rebuilt the entire transcript: renderLayoutFrame() started each frame with an empty cache, Container.render() copied every line of every child at each of about five nesting levels, and only then did the layout cut out the roughly 40 visible rows. Frames now reuse rendered output and re-render a component only when its content changes; regular mode is untouched, since the terminal scrolls its own scrollback there. The PR lists its trade-offs: a component that changes state without requestRender() stays stale while scrolling instead of being refreshed by it (it was already stale without scrolling), selection drag without scrolling still renders everything, regular-mode resize and the regular-mode spinner remain open, and the change has not yet been exercised in a real terminal.

One more change leaves the coding agent entirely: #12235 belongs to p2, the experimental self-hosted Pi Durable web UI inside pi’s monorepo (apps/p2), and makes its hints match the device they appear on. The web UI assumed one device everywhere — tap and long press where a mouse right-clicks and clicks, Cmd where Windows and Linux use Ctrl; the Send button’s tooltip said long press for more although desktop users see tooltips only with a mouse, whose right-click opens that menu. A new src/web/input-hints.ts module, exported through @p2/app/v1/web, derives a pointer kind — touch, mouse, or both — from the any-pointer media queries and updates it live, so attaching a trackpad keyboard to a tablet changes the wording; pressVerb() picks tap, click, or click or tap, moreVerb() picks long-press, right-click, or right-click or long-press, and the chords follow the platform: ⌘. versus Ctrl+. for the scope prompt, ⌥ versus Alt, with Send-menu shortcuts hidden on touch-only devices where Enter does not send. The TUI’s own hints are unchanged — they already read pi’s keybinding tables — and the PR notes it was AI-generated.

None of the eleven is in a release yet — the newest tag remains v1.5.2 from November 10 — so every note above describes code on main; the per-PR details are one click away on the merged list behind the source link.

source: https://github.com/earendil-works/pi/pulls?q=is%3Apr+is%3Aclosed+merged%3A2026-11-16T00%3A00%3A00Z..2026-11-17T00%3A00%3A00Z