Skip to content

feat(agent): add runtime agent switching#4

Merged
alsi-lawr merged 3 commits into
masterfrom
issue-3-runtime-agent-switching
May 31, 2026
Merged

feat(agent): add runtime agent switching#4
alsi-lawr merged 3 commits into
masterfrom
issue-3-runtime-agent-switching

Conversation

@alsi-lawr

Copy link
Copy Markdown
Owner

Summary

This adds first-class runtime agent switching to agent-term.nvim.

Users can now configure multiple named agents and switch between them with :AgentTermSwitch instead of editing setup config. Each configured agent owns its own persistent terminal session, so switching from Codex to Gemini and back preserves the existing sessions unless the user explicitly forces replacement with bang.

Closes #3.

User-Facing Behavior

  • Adds agents = { ... } as the setup model for named agents.
  • Adds :AgentTermSwitch [agent] to show or change the active agent.
  • Adds command completion for configured agent names only.
  • Persists the last selected active agent in Neovim state.
  • Keeps one terminal session per configured agent.
  • Keeps normal switching non-destructive.
  • Supports :AgentTermSwitch! <agent> to kill and recreate only the target agent session.
  • Applies preset, cmd, auto_resume, hooks, and context settings per agent.
  • Removes the unnecessary backend alias and related wording.

Docs And Demo

  • Updates README examples and help docs for the agents model.
  • Renames agent preset docs to docs/agents.md.
  • Adds a VHS tape and GIF demonstrating switching between Codex and Gemini.
  • Updates existing VHS setup snippets to use agents.

Validation

  • ./run_tests.sh
  • stylua --check lua tests
  • luacheck lua tests

@alsi-lawr
alsi-lawr force-pushed the issue-3-runtime-agent-switching branch from faf18c3 to 7dea784 Compare May 31, 2026 20:06
@alsi-lawr
alsi-lawr merged commit e527152 into master May 31, 2026
6 checks passed
@alsi-lawr
alsi-lawr deleted the issue-3-runtime-agent-switching branch June 1, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support runtime agent switching

1 participant