Skip to content

docs: explain tmux auto-attach guard in herdr panes - #4592

Merged
JJLiebig merged 2 commits into
masterfrom
auto-issue-4555-436942
Sep 24, 2026
Merged

JJLiebig merged 2 commits into
masterfrom
auto-issue-4555-436942

Conversation

@JJLiebig

@JJLiebig JJLiebig commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Document how to exclude Herdr panes from shell rules that automatically attach to tmux when TMUX is unset. The guidance uses Herdr's existing HERDR_ENV=1 marker and preserves the deliberate cleanup of inherited tmux session handles.

This is documentation only. Users with tmux auto-attach rules need to add the guard to their shell startup configuration.

Related: #4555.

Reproduction and options tested

  • On Ubuntu WSL2 with tmux 3.7c (window-size=latest), two outer clients at 138x40 and 112x37, and focus events enabled, the unguarded zsh startup rule attached a third client to the outer session. Geometry shrank from 112x36 to 41x1.
  • Adding the documented HERDR_ENV guard to that rule kept only the two outer clients, with stable geometry. This is the supported mitigation in this PR.
  • A Herdr-wide tmux socket directory made panes share one nested tmux shell and the first pane's identity. We discarded it.
  • A separate socket directory for each pane stopped the resize feedback and preserved pane identities, but split the shared named session into independent tmux servers. Agents inside those nested sessions remained invisible to Herdr, and the socket directories would need lifecycle management. We discarded this as a default runtime change.

Restoring inherited TMUX was not tested as a fix: #4461 deliberately removed those stale outer-session handles to address #4104. This PR changes no runtime behavior, and #4555 remains open.

Validation

  • just check passed on the rebased branch. The disposable WSL2 reproduction was cleaned up.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: d7f9eb04-d839-4ee7-854d-b5db2744ee14

📥 Commits

Reviewing files that changed from the base of the PR and between bea53e1 and d88a8e2.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: dd7171cf-7d94-4f3f-bc5d-3f104f1cf3b7

📥 Commits

Reviewing files that changed from the base of the PR and between c411883 and bea53e1.

📒 Files selected for processing (3)
  • docs/next/website/src/content/docs/agents.mdx
  • docs/next/website/src/content/docs/ja/agents.mdx
  • docs/next/website/src/content/docs/zh-cn/agents.mdx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The English, Japanese, and Chinese agent documentation now explains how to exclude Herdr panes from automatic tmux startup. Each page describes possible terminal shrinking and flickering when reconnecting to an outer tmux session and includes a zsh example that checks TMUX and HERDR_ENV.

Suggested reviewers: ogulcancelik

Merge Risk: ⚪ Minimal · up to bea53

The guidance matches Herdr’s pane environment behavior, and no material issue remains that should block merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the documentation change for guarding tmux auto-attach behavior in Herdr panes.
Description check ✅ Passed The description directly explains the documentation change, its purpose, tested behavior, and validation results.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kangal-bot

Copy link
Copy Markdown
Collaborator

@coderabbitai review
@greptileai

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps

greptile-apps Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The documentation change appears safe to merge.

Summary

The PR adds English, Japanese, and Simplified Chinese guidance for preventing shell startup rules from attaching to tmux inside Herdr panes.

  • Shows a HERDR_ENV guard to add to an existing tmux auto-attach condition.
  • Explains the terminal resizing and flicker that an inner attachment can cause.

Reviews (1) · Last reviewed commit: "docs: explain tmux auto-attach guard in ..."

@JJLiebig

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@JJLiebig
JJLiebig merged commit a28bed2 into master Sep 24, 2026
7 checks passed
abhijit-s pushed a commit to abhijit-s/herdr that referenced this pull request Sep 25, 2026
Merges 9 upstream commits: native kitty graphics rendering replacing
the custom graphics API (herdrdev#4561, breaking), navigator search term
matching (herdrdev#4535), avoiding inferring codex idle from terminal output
(herdrdev#4563), Windows input coverage reporting and clipboard test fixes
(herdrdev#4566), qualified Win32/Kitty input path test defaults (herdrdev#4587),
reduced redundant client ANSI encoding work (herdrdev#4552), reduced repeated
scrollback page lookups (herdrdev#4553), tmux auto-attach guard docs (herdrdev#4592),
and keeping copy mode active during projection updates (herdrdev#4281).

refs upstream herdrdev/herdr@8d95e9bd
davshn

This comment was marked as spam.

maciejul pushed a commit to maciejul/herdr-supercharged that referenced this pull request Oct 28, 2026
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.

3 participants