Skip to content

[idea] Cross-tab/server AI-agent activity indicator (agent_notify.lua only fires a one-shot toast) #313

Description

@stanfish06

What

lua/config/agent_notify.lua only fires a one-shot vim.notify toast when an AI agent (Claude/Codex) finishes — the module's own comment acknowledges the gap: once you move to another window, tab, or server, that signal is gone. There's no persistent, glanceable indicator of agent state.

Where

  • lua/config/agent_notify.lua — one-shot notification only, keeps M.last[agent] state but nothing renders it persistently
  • lua/config/options.luaTabLineCustom() already reads /proc/<pid>/stat's tpgid to detect which foreground process (e.g. claude) is running inside a :terminal buffer, for tab titles
  • lua/config/server.luawith_rpc_channel() / list_nvim_servers() already RPCs into other running nvim server instances, used by ShowNvimServers and the NvimHop picker

Why it matters

Two existing subsystems already have the raw signal needed (which terminal-tab is running an agent process, and RPC access to other server instances' state) but nothing combines them into a standing indicator. Right now, if an agent finishes in a tab or a different server instance you're not looking at, you only find out by manually checking.

Recommended action

Add a persistent indicator — e.g. an icon suffix in the tabline (reusing TabLineCustom()'s tpgid-based process detection) and/or a row suffix in the ShowNvimServers/NvimHop picker (reusing with_rpc_channel) — showing per tab/server either "● agent running" or the last agent_notify.M.last[agent] event with a relative timestamp (e.g. "✓ done 3m ago"). This is a new combination of two existing custom subsystems, not a duplicate of the existing push-notification behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions