Keep coding agents running when you close Paneflow
- Published
Choose Keep sessions running when quitting Paneflow to leave terminal processes in its separate session host. Reopen the app on the same running machine to reconnect. This preserves a living process across app closure; it does not restore a process after reboot.
Three things that can survive differently
- A terminal session connects a terminal to a process owned by the host. The process must still be alive to continue its work.
- An agent conversation is history managed by the agent. Resuming it uses that agent's session support and may start a new process.
- A layout records panes and their arrangement. Seeing the same layout again does not prove the previous commands are running.
This guide targets Paneflow 0.17.4. The maintainer confirmed closing with Keep sessions running and reopening into the same live process without reboot on Windows x64, on October 1, 2026. Linux and macOS were not exercised for this guide. The release's persistence contract describes attachment, restart and stop failures.
A small reconnection check
Use a disposable terminal before relying on the workflow for a long agent task. On Windows, open a PowerShell pane and run:
Write-Output "PROCESS=$PID"
$tick = 0
while ($true) { Write-Output "TICK=$tick"; $tick++; Start-Sleep -Seconds 2 }- Note the process ID and counter. Save any editor changes separately; terminal persistence is not a save operation for editor buffers.
- Quit Paneflow and choose Keep sessions running. If your quit preference bypasses the dialog, check it in Settings first. Leave the machine awake and do not stop the host.
- Reopen Paneflow. Observe the counter continuing rather than restarting at zero. Press
Ctrl+C, then runWrite-Output "PROCESS=$PID"to compare the same shell's ID. - Once that works in your environment, the same host mechanism can keep an agent process alive. Model connections, provider limits and permission requests still affect what the agent can accomplish while you are away.
The counter is a reproducible diagnostic, not a claim that this exact command was used in the maintainer's confirmation. It requires no model call. On Linux or macOS, use an equivalent local long-running command and record that platform's result separately.
Stop one session or everything
Stop everything and quit ends terminal sessions. On the next launch, the saved layout can reopen with fresh shells; it does not relaunch the previous agents. If a stop cannot be confirmed, Paneflow keeps the window open with the affected sessions and recovery choices. A timeout does not prove that a process stopped.
To end only one terminal session, select the live session's Stop session context-menu action in the sidebar and follow the close flow. This ends that session's process; it is not a detach action. For the counter above, Ctrl+C stops the loop while leaving the shell alive. Save useful work before ending either a session or all sessions.
If a terminal has ended, Restart starts a fresh shell. It does not replay the previous command. A missing or incompatible session may require a different recovery action; an unsuccessful attachment is not permission to assume a replacement process exists.
Host failure, sleep and conversation recovery
Host crash, machine shutdown and reboot can end the process. Sleep can suspend execution and break network connections; continuous progress or provider reconnection is not guaranteed. A process that exited while the app was closed cannot be made alive by reopening the layout.
For an ended agent, follow conversation resumption if that agent saved usable history. That is separate from reconnecting to a running terminal and cannot recover history that was never saved. See the session features reference for Paneflow's controls. Before leaving a real task running, confirm its checkout, current output and permission state.