doc/configuration/upgrading.md
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.
full_stack_dev group has been renamed to agent (#2786)next_edit_suggestion and list_code_usages tools have been removedinteractions.inline.keymaps to interactions.shared.keymaps (#2600)display.diff (#2600)variables have been renamed to editor_context and the config paths are now interactions.chat.editor_context and interactions.inline.editor_context (#2719)callback has been replaced by path for string values (module paths and file paths). callback is still used for function values, howeveropts.rules to rules:---
name: Oli's test workflow
strategy: chat
description: Workflow test prompt
rules:
- test_rule
---
strategies to interactions. This will only be a breaking change if you specifically reference codecompanion.strategies in your configuration. If you do, you'll need to change it to codecompanion.interactions (#2485)/catalog folders which have now been renamed to /builtin. If you reference these in your configuration you'll need to update the paths accordingly (#2482)condition to be enabled on any schema items (#2439):return {
schema = {
["reasoning.effort"] = {
---@type fun(self: CodeCompanion.HTTPAdapter): boolean
condition = function(self) -- [!code --]
enabled = function(self) -- [!code ++]
--
end,
},
}
}
claude-sonnet-4-5-20250929 and gemini-3-pro-preview, respectively (#2494)adapters.[acp|http].opts.show_defaults has been renamed to adapters.[acp|http].opts.show_presets for both HTTP and ACP adapters (#2497)memory in your configuration to rules. Please refer to the Rules documentation for more information (#2440)default_memory has been renamed to autoload (#2509)#{buffer}{watch} has been renamed to #{buffer}{diff}. This better reflects that an LLM receives a diff of buffer changes with each request (#2444)#{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):CodeCompanionChat is now done with :CodeCompanionChat adapter=<adapter_name> (#2437)opts.system_prompt you'll need to change it to interactions.chat.opts.system_prompt (#2484)If you have any prompts defined in your config, you'll need to:
opts.short_name to opts.alias for each item in order to allow you to call them with require("codecompanion").prompt("my_prompt") or as slash commands in the chat buffer (#2471).["my custom prompt"] = {
strategy = "chat",
description = "My custom prompt",
opts = {
short_name = "my_prompt", -- [!code --]
alias = "my_prompt", -- [!code ++]
},
prompts = {
-- ...
},
},
strategy = "workflow" with interaction = "chat" and specifying opts.is_workflow = true (#2487).["my_workflow"] = {
strategy = "workflow", -- [!code --]
interaction = "chat", -- [!code ++]
description = "My custom workflow",
opts = {
is_workflow = true, -- [!code ++]
},
prompts = {
-- ...
},
},
display.action_palette.show_default_prompt_library to display.action_palette.show_preset_prompts (#2499)If you have any tools in your config, you'll need to rename:
requires_approval to require_approval_before (#2439)user_confirmation to require_confirmation_after (#2450)These now better reflect the timing of each action.