Skip to content

Integrations ​

CodeCompanion fires events at various points during the lifecycle, so other applications can follow what it's doing. Some integrations are built in.

herdr ​

herdr supervises terminal panes and shows which agent is running in each one. When Neovim runs in a herdr pane, or a terminal in the Herdr app, CodeCompanion reports its state to herdr, so the pane sits alongside panes running Claude Code or Codex:

StateDescription
workingA chat buffer or CLI interaction is waiting on a response, compacting or running tools
blockedA tool approval or a question from the LLM is waiting on you
doneA turn finished whilst you were looking elsewhere (Herdr app only)
idleNothing is in progress

The status of a chat buffer or CLI interaction from within Neovim is shown as the pane's state. A blocked interaction takes priority and the Herdr app shows whether that pane is waiting on a tool approval or a question.

In the Herdr app, panes are given the active chat's title, or CodeCompanion [branch]. This is skipped when Neovim's 'title' option is on, as Neovim then sets the terminal title itself.

The integration is enabled by default, and does nothing outside of herdr. To disable it:

lua
require("codecompanion").setup({
  integrations = {
    herdr = {
      enabled = false,
    },
  },
})

The Herdr app shows an icon for each agent from its programs table. To give CodeCompanion the Neovim icon, add this to ~/.config/herdr-app/programs.json:

json
{
  "programs": {
    "codecompanion": { "name": "CodeCompanion", "icon": "icons/nvim.svg", "tint": true, "tile": "#57a143", "color": "#ffffff" }
  }
}

Limitations

  • In the Herdr app, the state doesn't reach herdr when Neovim runs inside tmux or another multiplexer

Rex ​

Rex is a terminal multiplexer that shows what the programs in its panes are doing. When Neovim runs in Rex, CodeCompanion reports each chat buffer and CLI interaction with the Program Status Protocol, so they appear in Rex's tabs, session picker and activity view:

StateDescription
workingWaiting on a response, compacting or running tools
blockedA tool approval or a question from the LLM is waiting on you
doneFinished a response you haven't looked at yet
idleOpen, with nothing in progress

Each chat buffer and CLI interaction is reported separately, under its title where it has one. Closing it removes it from Rex, as does quitting Neovim.

The integration is enabled by default, and does nothing outside of Rex. To disable it:

lua
require("codecompanion").setup({
  integrations = {
    rex = {
      enabled = false,
    },
  },
})

Released under the Apache-2.0 License.