You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support the Program Resume Protocol (OSC 7577) so terminals can restore conversations after a restart #5637
Describe the feature or problem you'd like to solve
Terminals and multiplexers such as Herdr (herdr-core 0.1.23+) now support the Program Resume Protocol (OSC 7577). A program reports the command that brings it back, and after a reboot, crash or terminal restart the terminal runs it in the same pane and folder.
Pi and Crush already report it. Copilot CLI doesn't, so after a reboot every Copilot pane returns as a bare shell and each conversation has to be found and resumed by hand. The legacy Herdr TUI worked around this with a Copilot-specific SessionStart hook; Herdr Desktop deliberately relies on the protocol instead (herdrdev/herdr-app#974).
Proposed solution
Request: when OSC7577_TOKEN is present, report copilot --resume=<active session id> (with cwd) and update it when the active conversation changes (/resume, /new, /fork, sidebar switches). Send clear=1 on a deliberate exit, but not when the process is killed by a shutdown.
Example prompts or workflows
Additional context
Existing coding-agent implementations (source-level examples; not claims about a particular released version):
Pi: reports a command such as pi --session <session-id-or-path> together with the session cwd, retaining applicable configuration flags and updating the report when sessions change. See merged earendil-works/pi#12557, command construction, and its OSC 7577 reporter.
Crush: reports a command such as crush --session <session-id> together with the session cwd. Its command builder can preserve host, data-directory and prompt settings, while deliberately omitting --yolo and --channels. See merged charmbracelet/crush#4434, command construction, and session/cwd reporting.
These are implementations of OSC 7577 resume-command reporting, distinct from OSC 7501 program-status reporting.
Resumed sessions already keep their model, mode and permission state, so no extra flags are needed in the reported command.
Activity