feat(session): per-session git identity from session name#1
Open
DerekfromMadison wants to merge 1 commit into
Open
feat(session): per-session git identity from session name#1DerekfromMadison wants to merge 1 commit into
DerekfromMadison wants to merge 1 commit into
Conversation
Stamp GIT_AUTHOR_* / GIT_COMMITTER_* onto each tmux session's env, derived from the session's display name (slugged to <name>@codeman.local). Every commit a session makes is then attributable to that session and overrides any repo-local user.name — the only thing that works when sessions share a working dir (per-dir git config can't tell them apart; env vars beat all config files). Mirrors setOpenCodeEnvVars (tmux setenv, inherited by panes, invisible in ps). Called on session create and on rename; the session env persists across respawns, so a rename re-stamps and the next (re)spawn adopts the new name, while a running process keeps its spawn-time identity until it respawns.
DerekfromMadison
pushed a commit
that referenced
this pull request
Jun 13, 2026
feat(frontend): inline rename for session names
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.
What
Each CodeMan session now commits under its own git identity, derived from the session's display name: a session named
w1-axonauthors commits asw1-axon <w1-axon@codeman.local>.Why
Running several sessions in parallel, every commit was attributed to the same identity — whatever the repo's local
user.namehappened to be. Per-session identity makesgit logattribution and per-session rollback clean when multiple agents touch the same repo.How
setGitIdentityEnvVars(muxName, name)intmux-manager.ts, mirroring the existingsetOpenCodeEnvVars(usestmux setenv, inherited by panes, invisible inps).createSession(just beforerespawn-pane) and inupdateSessionName.GIT_AUTHOR_*andGIT_COMMITTER_*— env vars, because they're the only thing that overrides a repo-localuser.name, and they work even when multiple sessions share one working directory (per-directory git config can't tell them apart).Behavior
[a-z0-9._-]collapse to-, e.g.auth analysisbecomesauth-analysis@codeman.local.Verified live
9 concurrent sessions each commit under their own name; a real commit from a session named
idis authoredid <id@codeman.local>, overriding the repo-local identity. One session caught mid-rename showed its session env updated while the still-running process kept its spawn-time name — exactly as documented above.