Add CLI multi-repo support and configurable worktree base dir#435
Open
zsedem wants to merge 13 commits intoasheshgoplani:mainfrom
Open
Add CLI multi-repo support and configurable worktree base dir#435zsedem wants to merge 13 commits intoasheshgoplani:mainfrom
zsedem wants to merge 13 commits intoasheshgoplani:mainfrom
Conversation
0604723 to
3db4877
Compare
…hgoplani#366) Check existing terminal-features before appending to avoid duplicates that balloon the list to 260+ entries over multiple session starts. Committed by Ashesh Goplani
When the name field is left empty, a random adjective-noun name (e.g., "golden-eagle") is shown as a dimmed placeholder and used on submit. The worktree branch placeholder also reflects the generated name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Branch shows as dimmed placeholder (not filled input) when using generated name; only fills when user types a custom name - Align Validate() and GetValuesWithWorktree() branch derivation logic - Add tests for generated name fallback, branch placeholder behavior, and worktree branch derivation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…key input The extended-keys option was set server-wide (`set -sq`), which caused tmux to activate xterm modifyOtherKeys mode on the outer terminal (iTerm2, etc.). This persisted even after the tmux option was turned off, causing Ctrl+R and other modified keys to be sent as escape sequences that Bubble Tea cannot parse — breaking the recent sessions picker and other Ctrl-key shortcuts in the dashboard. Two fixes: - tmux.go: changed `set -sq extended-keys on` to per-session `set-option -t <session> -q extended-keys on` at both call sites - keyboard_compat.go: also disable xterm modifyOtherKeys (ESC[>4;0m) on TUI startup alongside the existing Kitty protocol disable, as a defense-in-depth measure Fixes regression introduced in b427418 (asheshgoplani#342).
- Add repeatable --add-path flag to both add and launch commands for creating multi-repo sessions from the CLI (no TUI required) - Extract multi-repo setup logic from home.go into session.SetupMultiRepo so TUI and CLI share the same implementation - Add multi_repo_base_dir option to [worktree] config section, defaulting to ~/.agent-deck/multi-repo-worktrees (backward compatible) - Replace all hardcoded multi-repo base paths with session.GetMultiRepoBaseDir() Model: Sonnet 4.6 (claude-sonnet-4-6) 🤖 Generated with [Claude Code](https://claude.com/code) Co-Authored-By: Claude <noreply@anthropic.com>
When both -w/--worktree and --add-path are used together, the single-repo worktree creation block was running before SetupMultiRepo, causing a path resolution error. SetupMultiRepo already handles the multi-repo + worktree case correctly, so the single-repo block should be bypassed entirely. Model: Sonnet 4.6 (claude-sonnet-4-6) 🤖 Generated with [Claude Code](https://claude.com/code) Co-Authored-By: Claude <noreply@anthropic.com>
--add-path was missing from the valueFlags map, causing the flag parser to treat its value (/path/to/repo) as a positional arg. With multiple flags after --add-path (like -w branch), Go's flag package would then consume the -w flag name as the value for --add-path, leaving the branch name as the positional path argument — producing the "path does not exist" error when validating the session path. Model: Sonnet 4.6 (claude-sonnet-4-6) 🤖 Generated with [Claude Code](https://claude.com/code) Co-Authored-By: Claude <noreply@anthropic.com>
…ctory Multi-repo sessions have a parent directory (MultiRepoTempDir) containing symlinks/worktrees for each repo. The tmux session should start in this parent dir so the user lands at the top of the multi-repo workspace, not inside one of the individual repositories. Two code paths were using ProjectPath (the first repo symlink) instead: - storage.go ReconnectSessionLazy: used on TUI startup when reconnecting to existing tmux sessions loaded from storage - instance.go restart path: used when recreating the tmux session on R key or MCP restart Fix both to use EffectiveWorkingDir(), which returns MultiRepoTempDir for multi-repo sessions and ProjectPath otherwise. Model: Sonnet 4.6 (claude-sonnet-4-6) 🤖 Generated with [Claude Code](https://claude.com/code) Co-Authored-By: Claude <noreply@anthropic.com>
Users can now add repositories to an existing multi-repo session without recreating it: agent-deck session set <id> add-path /path/to/new-repo Creates a symlink (or git worktree if the session was created with -w) inside the session's existing MultiRepoTempDir parent, then persists the updated AdditionalPaths. Name conflicts are resolved by appending a numeric suffix (e.g. repo-1). Model: Sonnet 4.6 (claude-sonnet-4-6) 🤖 Generated with [Claude Code](https://claude.com/code) Co-Authored-By: Claude <noreply@anthropic.com>
3db4877 to
4551461
Compare
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 changed
--add-pathflag on bothaddandlaunchcommands — repeatable, creates multi-repo sessions from CLI without the TUI:session.SetupMultiRepo()— the multi-repo symlink/worktree setup logic fromhome.gois now ininternal/session/multirepo_setup.go, shared by both TUI and CLI code pathsmulti_repo_base_dirconfig option in[worktree]section ofconfig.toml— overrides the hardcoded~/.agent-deck/multi-repo-worktrees/default; supports~/expansionWhy
Multi-repo sessions were TUI-only. Conductor sessions and scripted workflows need to create them from the CLI.
🤖 Generated with Claude Code