Upgrading CodeCompanion
This document provides a guide for upgrading from one version of CodeCompanion to another.
CodeCompanion follows semantic versioning and to avoid breaking changes, it is recommended to pin the plugin to a specific version in your Neovim configuration. The installation guide provides more information on how to do this.
v17.33.0 to v18.0.0
Config
- The biggest change in this release is the renaming of
strategiestointeractions. This will only be a breaking change if you specifically referencecodecompanion.strategiesin your configuration. If you do, you'll need to change it tocodecompanion.interactions(#2485) - Previously, built-in slash commands and tools were stored in
/catalogfolders which have now been renamed to/builtin. If you reference these in your configuration you'll need to update the paths accordingly (#2482)
Adapters
- If you have a custom adapter, you'll need to rename
conditionto beenabledon any schema items (#2439) - The default adapters on the Anthropic and Gemini adapters have changed to
claude-sonnet-4-5-20250929andgemini-3-pro-preview, respectively (#2494) - If you wish to hide the adapters that come with CodeCompanion,
adapter.[acp|http].opts.show_defaultshas been renamed toadapter.[acp|http].opts.show_presetsfor both HTTP and ACP adapters (#2497)
Chat
- Memory has been renamed to rules. Please rename any references to
memoryin your configuration torules. Please refer to the Rules documentation for more information (#2440) default_memoryhas been renamed toautoload(#2509)
- The variable and parameter
#{buffer}{watch}has been renamed to#{buffer}{diff}. This better reflects that an LLM receives a diff of buffer changes with each request (#2444) - The variable and parameter
#{buffer}{pin}has now been renamed to#{buffer}{all}. This better reflects that the entire buffer is sent to the LLM with each request (#2444)
- Passing an adapter as an argument to
:CodeCompanionChatis now done with:CodeCompanionChat adapter=<adapter_name>(#2437) - If your chat buffer system prompt is still stored at
opts.system_promptyou'll need to change it tointeractions.chat.opts.system_prompt(#2484)
Prompt Library
If you have any prompts defined in your config, you'll need to:
- Rename
opts.short_nametoopts.aliasfor each item in order to allow you to call them withrequire("codecompanion").prompt("my_prompt")or as slash commands in the chat buffer (#2471).
lua
["my custom prompt"] = {
strategy = "chat",
description = "My custom prompt",
opts = {
short_name = "my_prompt",
alias = "my_prompt",
},
prompts = {
-- ...
},
},- Change all workflow prompts, replacing
strategy = "workflow"withinteraction = "chat"and specifyingopts.is_workflow = true(#2487).
lua
["my_workflow"] = {
strategy = "workflow",
interaction = "chat",
description = "My custom workflow",
opts = {
is_workflow = true,
},
prompts = {
-- ...
},
},- If you don't wish to display any of the built-in prompt library items, you'll need to change
display.action_palette.show_default_prompt_librarytodisplay.action_palette.show_preset_prompts(#2499)
Tools
If you have any tools in your config, you'll need to rename:
requires_approvaltorequire_approval_before(#2439)user_confirmationtorequire_confirmation_after(#2450)
These now better reflect the timing of each action.