-
Notifications
You must be signed in to change notification settings - Fork 0
Use C-Space tmux prefix in remote sessions; document GitHub stacked PRs for agents #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b6eaf31
f517a9a
cc2a40f
aa93677
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,11 @@ | ||
| # Remote (ssh/mosh) sessions use C-Space as prefix, so the local C-b doesn't | ||
| # need doubling to reach nested tmux; mosh sets SSH_CONNECTION but not SSH_TTY | ||
| if-shell 'test -n "$SSH_CONNECTION" || test -n "$SSH_TTY"' { | ||
| unbind C-b | ||
| set -g prefix C-Space | ||
| bind C-Space send-prefix | ||
| } | ||
|
Comment on lines
+3
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
socket="coderabbit-prefix-review-$$"
trap 'tmux -L "$socket" kill-server >/dev/null 2>&1 || true' EXIT
env -u SSH_CONNECTION -u SSH_TTY \
tmux -L "$socket" -f tmux/.tmux.conf \
new-session -d -s persistent
before="$(tmux -L "$socket" show-options -gv prefix)"
SSH_CONNECTION='client 1 2 3' \
tmux -L "$socket" new-session -d -s ssh-client
after="$(tmux -L "$socket" show-options -gv prefix)"
test "$before" = C-b
test "$after" = C-SpaceRepository: Vilos92/dotfiles Length of output: 197 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- tmux/.tmux.conf ---'
cat -n tmux/.tmux.conf
printf '%s\n' '--- relevant AGENTS.md text ---'
if [ -f AGENTS.md ]; then
sed -n '75,95p' AGENTS.md
else
printf '%s\n' 'AGENTS.md not found at repository root'
fi
printf '%s\n' '--- tmux references ---'
rg -n -i 'tmux|C-Space|C-b|SSH_CONNECTION|SSH_TTY' --glob '!node_modules' --glob '!dist' --glob '!build' .Repository: Vilos92/dotfiles Length of output: 5630 🌐 Web query:
💡 Result: The tmux server reads its configuration files only when it first starts [1]. By default, it loads /etc/tmux.conf if present, followed by the user configuration file at ~/.tmux.conf or the location specified by $XDG_CONFIG_HOME/tmux/tmux.conf [2][3][1]. Regarding the interaction between tmux and environment variables like SSH_CONNECTION when a client attaches, the following points apply: 1. Server Lifecycle: The tmux server is a long-running process [4]. Once started, it does not re-read configuration files or refresh its global environment unless explicitly instructed to do so (e.g., via the source-file command) [5][1]. 2. update-environment Option: tmux maintains a session environment that is merged with the global environment when new windows are created [6][7]. To ensure that specific environment variables—such as SSH_CONNECTION or SSH_AUTH_SOCK—are updated in the session when a client attaches to an existing server, those variables must be included in the tmux option update-environment [7][8]. 3. Client Attachment: When update-environment is configured, tmux automatically updates the variables listed in that option within the session environment whenever a new client attaches [7]. This allows the new client's environment values to be propagated to the session [9][7]. 4. Existing Processes: Note that updating environment variables in the tmux session environment affects only new windows or panes created after the update [7]. Existing shell processes already running within the tmux session will typically retain their original, stale environment variables unless the user manually updates them, for example by using tmux show-environment to export the new values into the current shell [9][7]. Citations:
Use separate tmux sockets for local and SSH clients. 🤖 Prompt for AI Agents |
||
|
|
||
| # Address vim mode switching delay | ||
| set -sg escape-time 0 | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
sed -n '115,165p' claude-md/.claude/CLAUDE.mdRepository: Vilos92/dotfiles
Length of output: 5678
🌐 Web query:
GitHub gh-stack native stacked pull requests private preview same repository cross-fork support💡 Result:
As of August 4, 2026, GitHub's native stacked pull request functionality is in public preview [1][2][3]. The feature allows users to chain pull requests within the same repository, where each pull request targets the branch of the one below it [1][4]. Key details regarding the current status and limitations of this feature: 1. Repository Requirement: Stacked pull requests must reside entirely within the same repository [1][3]. Official GitHub documentation explicitly states that cross-fork stacks are not supported [1][3]. 2. Public Preview Status: The feature transitioned from private preview to public preview on July 30, 2026 [2][5]. 3. Tooling Support: Management of these stacks is primarily handled through the
gh stackGitHub CLI extension [1][3][6]. The feature is also integrated into the GitHub website, GitHub Mobile, and is accessible via the API, allowing users to navigate and merge stacked pull requests directly within the platform [3][4]. Because the requirement for all branches to be in the same repository is a stated limitation in the official documentation, cross-fork support remains unavailable at this time [1][3].Citations:
Make native stacks conditional on support.
If
gh-stackis unavailable or the branches span repositories, use the documented manual fallback. Native stacked PRs currently require all branches to be in the same repository. Update the rule and lines 153–157 accordingly.🤖 Prompt for AI Agents