Bug Description
specify integration switch re-registers enabled extensions' commands for the target agent (register_enabled_extensions_for_agent). specify integration install and specify integration upgrade do not. integration.setup() only installs the integration's own core commands, not extension commands.
So when a second integration is added to a project, the new agent is missing the extension commands the first agent has (e.g. the bundled agent-context extension's /speckit.agent-context.update, and any other installed extension's commands).
Steps to Reproduce
specify init --here --integration claude
specify integration install codex
- Inspect
.specify/extensions/.registry: the agent-context entry's registered_commands contains only claude, not codex.
Reproduced on main @ 7106858:
registered_commands: { "claude": ["speckit.agent-context.update"] }
No codex key; codex has no rendered speckit.agent-context.update command.
Expected Behavior
Installing/upgrading an integration registers the enabled extensions' commands for that integration's agent, same as switch does — so every installed agent has the same extension commands.
Actual Behavior
Only switch registers extension commands for an agent. A second integration added via install (or refreshed via upgrade) never gets them, so its extension commands are silently absent.
Question for maintainers
The fix is to call register_enabled_extensions_for_agent(<agent>) from install and upgrade (as switch already does). Before I open a PR, one decision is yours:
Should install/upgrade register all enabled extensions for the new agent (full parity with switch), or only a subset?
- Full parity (recommended): every installed agent ends up with every enabled extension's commands. Consistent with
switch; smallest, most predictable change. Downside: install/upgrade start writing more files than today.
- Subset / opt-in: narrower blast radius, but special-cases which extensions propagate to which agents — more config, easy to get inconsistent.
If full parity is fine, I'll send a PR adding the register_enabled_extensions_for_agent call to both paths with tests.
Code references (main @ 7106858)
integrations/_migrate_commands.py — switch calls register_enabled_extensions_for_agent(target); upgrade does not.
integrations/_install_commands.py — install does not call it.
integrations/base.py — setup() installs the integration's own commands only.
Specify CLI Version
main @ 7106858
AI Agent
Codex CLI
Related: #2879 (multi-integration), #2881 / #2885 (agent-context back-fill — surfaced this gap but intentionally left it out of scope).
Bug Description
specify integration switchre-registers enabled extensions' commands for the target agent (register_enabled_extensions_for_agent).specify integration installandspecify integration upgradedo not.integration.setup()only installs the integration's own core commands, not extension commands.So when a second integration is added to a project, the new agent is missing the extension commands the first agent has (e.g. the bundled agent-context extension's
/speckit.agent-context.update, and any other installed extension's commands).Steps to Reproduce
specify init --here --integration claudespecify integration install codex.specify/extensions/.registry: the agent-context entry'sregistered_commandscontains onlyclaude, notcodex.Reproduced on
main@7106858:No
codexkey; codex has no renderedspeckit.agent-context.updatecommand.Expected Behavior
Installing/upgrading an integration registers the enabled extensions' commands for that integration's agent, same as
switchdoes — so every installed agent has the same extension commands.Actual Behavior
Only
switchregisters extension commands for an agent. A second integration added viainstall(or refreshed viaupgrade) never gets them, so its extension commands are silently absent.Question for maintainers
The fix is to call
register_enabled_extensions_for_agent(<agent>)frominstallandupgrade(asswitchalready does). Before I open a PR, one decision is yours:Should
install/upgraderegister all enabled extensions for the new agent (full parity withswitch), or only a subset?switch; smallest, most predictable change. Downside:install/upgradestart writing more files than today.If full parity is fine, I'll send a PR adding the
register_enabled_extensions_for_agentcall to both paths with tests.Code references (
main@7106858)integrations/_migrate_commands.py—switchcallsregister_enabled_extensions_for_agent(target);upgradedoes not.integrations/_install_commands.py—installdoes not call it.integrations/base.py—setup()installs the integration's own commands only.Specify CLI Version
main @
7106858AI Agent
Codex CLI
Related: #2879 (multi-integration), #2881 / #2885 (agent-context back-fill — surfaced this gap but intentionally left it out of scope).