Skip to content

herdr agent panel keeps a stale nikcli row after nikcli quits #232

Description

@SandroHub013

Description

Quitting nikcli leaves a stale nikcli row in herdr's agent panel. It only disappears when you type exit in the pane's shell, which kills the pane itself.

Herdr clears an agent automatically only for the agents it recognizes by process. nikcli is reported, not detected, so herdr keeps the row until someone calls pane.release_agent. Nothing does:

  • HerdrPlugin.dispose() calls HerdrBridge.stop(), and stop() only resets local runtime state — no release.
  • releasePane() exists but is only reachable from the agent-facing herdr tool and releaseSession().

So claude, agy, pi and the rest drop out of the panel when they exit, and nikcli doesn't.

Note process.on("exit") can't await a socket write, so the release on the shutdown path has to be synchronous.

Plugins

none

Nikcli version

1.292.0 (also present on live-main today)

Steps to reproduce

  1. Start herdr, open a pane, run nikcli. The agent panel shows a nikcli row.
  2. Quit nikcli (ctrl+c) — back to the shell prompt, nikcli's process is gone.
  3. herdr pane get <pane_id> still reports "agent":"nikcli", and the row is still in the panel.
  4. Type exit in the shell. Only then does the row disappear — because the pane goes with it.

Screenshot and/or share link

Agent panel showing nikcli · 5 for a pane whose nikcli process has already exited (shell prompt visible in the pane).

Operating System

Windows 11 Home 26200

Terminal

WezTerm, inside a herdr pane (herdr 0.8.0-preview)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions