Skip to content

herdr-core: restarting an agent in a terminal that was pinned before Ovis restarted unpins it in the Herdr app #2707

Closed

Description

@devswha

On herdr-core, Ovis keeps pinned agents in step with the Herdr app through herdr.pinned (#2694), remembering in herdr-core-pins.json what both sides last agreed on per terminal. A terminal that stopped running an agent while Ovis was stopped keeps its agreement, so a later restart of the agent there is read as an unpin made in Ovis.

Steps (OVIS_RUNTIME=herdr-core):

  1. Pin an agent (e.g. Claude Code) in the Herdr app or in Ovis; both sides agree it is pinned.
  2. Quit the agent in that terminal, leaving its shell, and restart the Ovis server (an update, say).
  3. In Ovis, pin another agent: the Agents list drops the shell's pin, as it holds agents only.
  4. Start the agent again in that terminal.

Expected: the Herdr app keeps it pinned.
Actual: Ovis writes herdr.pinned= (empty) and the Herdr app's pin is gone.

Cause: after a reconnect the bridge clears its set of agent terminals and reads the snapshot; a terminal that is no longer an agent never goes through the agent-to-shell transition, so its agreement is not dropped (server/herdr-core/pin-label.ts, agentIs). Reproduced by the review on fabe6f3 with the PR's fake hc.

Likely fix: while reading a snapshot, drop the agreement of every terminal whose status names no agent, and add a regression test for it.

Activity

  1. added a commit that references this issue on Nov 4, 2026
    ae78bb0
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions