Skip to content

Support the Program Resume Protocol (OSC 7577) so terminals can restore conversations after a restart #5637

Backlog

Description

@domgord

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):

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

  1. added
    area:sessions
    and removed on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:sessions

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions