spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

Switch agents without re-initializing the project

Open JoelGoodman19 opened this issue 1 year ago • 10 comments

I work with a few coding agents and I want to be able to switch the agent without re-initiating the project. e.g. command "specify agent --claude" and then when I want to switch to a different agent "specify agent --gemini"

JoelGoodman19 avatar Oct 14 '25 11:10 JoelGoodman19

I have same question, any idea for best Practice

Rabithua avatar Oct 17 '25 11:10 Rabithua

Yeah this would be great - I currently have a claude pro sub as well as a github copilot pro sub, with the current usage issues on claude and the spec-kit being pretty token heavy it would be great to fall back to copilot and continue working

mitchstapleton avatar Oct 17 '25 14:10 mitchstapleton

This approach has worked for me in an existing spec-kit project:

specify init --here --ai <new-agent> --no-git

E.g. for codex, this added the .codex folder. It also updated .specify/scripts and .specify/templates with the latest from the spec-kit github repo.

Note this also overwrites .specify/memory/constitution.md to the initial empty version, this needs to be reverted in an existing spec-kit project:

git restore .specify/memory/constitution.md

Can also run .specify/scripts/bash/update-agent-context.sh codex to generate / update AGENTS.md; presumably that would happen autoamtically on subsequent /speckit.specify invocation

gjmorris avatar Oct 18 '25 19:10 gjmorris

Yes, I have done that as well as a workaround. it's just less user friendly.

JoelGoodman19 avatar Oct 18 '25 21:10 JoelGoodman19

I noticed similar behavior that everything is overwritten if we add a new agent to an already initialized project.

I have my own customized branch conversions embedded in slightly modified bash scripts generated by spec kit. e.g. -- but folder names still have NNN- prefix e.g. NNN---.

Those bash scripts and templates are overwritten by spec kit whenever a new agent is added. However, it's not a blocker since I can revert changes using git but there should be an option to add a new agent without touching already added bash scripts and templates.

Question: what do you mean by agent switching? you can add support for multiple agents and can use whatever agent you want. Or am I missing something?

armujahid avatar Oct 24 '25 17:10 armujahid

Correct I want to have Claude and codex initialized and be able to witch between them without re-initializing the project

JoelGoodman19 avatar Oct 24 '25 18:10 JoelGoodman19

I do agree that making that switch user-friendly or supporting multiple AIs at the same time would be a nice feature for the future. The current workaround is cumbersome...

chriso0710 avatar Nov 21 '25 13:11 chriso0710

#2065 Like this post to speed up implementation.

gabrielhmsantos avatar Apr 03 '26 15:04 gabrielhmsantos

Check this answer: https://github.com/github/spec-kit/issues/1228#issuecomment-4266845501

lazarius-borg avatar Apr 17 '26 15:04 lazarius-borg

Closing this one out too. See comment above for additional context

mnriem avatar Apr 17 '26 15:04 mnriem