Skip to content

feat(session): flip DefaultAgent to hermes#26

Merged
aksOps merged 1 commit into
mainfrom
feat/hermes-default
May 15, 2026
Merged

feat(session): flip DefaultAgent to hermes#26
aksOps merged 1 commit into
mainfrom
feat/hermes-default

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 15, 2026

Summary

Flips session.DefaultAgent from codex to hermes, plus the smaller surfaces that pin to that constant. ctm new / ctm yolo without an explicit --agent flag now spawn Hermes Agent.

Option 1 of the design (per discussion): legacy claude rows continue to migrate to codex (the v2→v3 on-disk migration target) — not DefaultAgent — in both Store.Save and Session.NormalizeAgent. Changing the default later cannot silently retarget historical claude conversations onto whatever the current default happens to be. Only NEW sessions with empty Agent default to hermes.

Files changed

Area Files
Code internal/session/state.go (constant + Save + NormalizeAgent + doc comments)
Tests internal/session/state_test.go (rename + flip default assertion), internal/session/state_migration_test.go (rename + assert on session.DefaultAgent constant, not literal), internal/session/spawn_test.go + spawn_discovery_test.go (add hermes blank-import + pin codex tests to Agent: \"codex\"), cmd/yolo_helpers_test.go (default-name assertions now use session.DefaultAgent)
Docs README.md (quickstart line, default-session table row, Multi-agent feature bullet, post-install copy), CHANGELOG.md ([Unreleased] / Changed entry)

Behavior changes

  • ctm / ctm new / ctm yolo with no --agent flag now spawns hermes
  • ctm yolo with no args creates a tmux session named hermes (was codex) — the resolveSimpleName fallback also reads from DefaultAgent
  • Existing sessions stamped with agent: \"codex\" keep using codex unchanged
  • Legacy claude rows still migrate to codex (not hermes)

Test plan

  • go test ./... — 410 tests pass
  • go vet ./... clean
  • go build clean
  • ctm doctor lists tmux/codex/hermes/git
  • Tests now reference session.DefaultAgent rather than the literal \"codex\" where they were testing default behavior — future default flips won't silently pass when the assertion drifts
  • Manual smoke: ctm new mytask (no --agent) → verify hermes spawn; ctm new --agent codex mytask2 → verify codex still works; existing sessions in user's ~/.config/ctm/sessions.json remain on whatever agent they had

Risks / notes

  • Behavioral change for users currently relying on default-codex. Mitigated by the explicit migration-target preservation: nothing on disk gets retargeted.
  • cmd/yolo.go's resolveSimpleName uses session.DefaultAgent as the default session NAME (not agent name) — this is a slightly questionable historic coupling but out of scope here; the rename effect is consistent with the constant's role as "the conventional default identity".
  • Tests in internal/session/spawn_*_test.go that exercise codex-specific discovery now pin Agent: \"codex\" explicitly rather than relying on the default — this is the correct fix, not a workaround.

🤖 Generated with Claude Code

ctm new / ctm yolo without --agent now spawn Hermes Agent. The
default-name fallback in cmd/yolo.go's resolveSimpleName also flips,
so 'ctm yolo' with no args creates a session named 'hermes'.

Option 1 of the default-flip design: legacy claude rows continue to
migrate to 'codex' (the v2->v3 target) — not DefaultAgent — in both
Store.Save and Session.NormalizeAgent, so this flip cannot silently
retarget historical conversations. Tests pinned to the literal 'codex'
have been rewritten against session.DefaultAgent where they were
testing the default path, or pinned to Agent: "codex" where they
were testing codex-specific discovery.

README + CHANGELOG updated.
@sonarqubecloud
Copy link
Copy Markdown

@aksOps aksOps merged commit 8949d4c into main May 15, 2026
10 checks passed
@aksOps aksOps deleted the feat/hermes-default branch May 15, 2026 17:18
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.

1 participant