feat(session): flip DefaultAgent to hermes#26
Merged
Conversation
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Flips
session.DefaultAgentfromcodextohermes, plus the smaller surfaces that pin to that constant.ctm new/ctm yolowithout an explicit--agentflag now spawn Hermes Agent.Option 1 of the design (per discussion): legacy
clauderows continue to migrate tocodex(the v2→v3 on-disk migration target) — notDefaultAgent— in bothStore.SaveandSession.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
internal/session/state.go(constant + Save + NormalizeAgent + doc comments)internal/session/state_test.go(rename + flip default assertion),internal/session/state_migration_test.go(rename + assert onsession.DefaultAgentconstant, not literal),internal/session/spawn_test.go+spawn_discovery_test.go(add hermes blank-import + pin codex tests toAgent: \"codex\"),cmd/yolo_helpers_test.go(default-name assertions now usesession.DefaultAgent)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 yolowith no--agentflag now spawns hermesctm yolowith no args creates a tmux session namedhermes(wascodex) — the resolveSimpleName fallback also reads fromDefaultAgentagent: \"codex\"keep using codex unchangedclauderows still migrate tocodex(not hermes)Test plan
go test ./...— 410 tests passgo vet ./...cleango buildcleanctm doctorlists tmux/codex/hermes/gitsession.DefaultAgentrather than the literal\"codex\"where they were testing default behavior — future default flips won't silently pass when the assertion driftsctm new mytask(no--agent) → verify hermes spawn;ctm new --agent codex mytask2→ verify codex still works; existing sessions in user's~/.config/ctm/sessions.jsonremain on whatever agent they hadRisks / notes
cmd/yolo.go'sresolveSimpleNameusessession.DefaultAgentas 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".internal/session/spawn_*_test.gothat exercise codex-specific discovery now pinAgent: \"codex\"explicitly rather than relying on the default — this is the correct fix, not a workaround.🤖 Generated with Claude Code