Skip to content

Preserve exit status across bash prompt hooks - #9533

Closed
austinywang wants to merge 2 commits into
mainfrom
issue-5389-cmux-prompt-command-clobbers-for-downstr
Closed

austinywang wants to merge 2 commits into
mainfrom
issue-5389-cmux-prompt-command-clobbers-for-downstr

Conversation

@austinywang

@austinywang austinywang commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • preserve the user command exit status when _cmux_prompt_command runs before downstream PROMPT_COMMAND entries
  • return the captured status from normal completion and every early-exit path
  • cover both array and semicolon-joined prompt chains across transport/identity return paths

Fixes #5389

Testing

  • Red: CI run 30884232606 on test-only commit 3c5b7bc22d failed in Validate bash prompt hooks preserve command status: the downstream hook observed 0, expected 1.
  • Green: CI run 30884499202 on fix commit ee15d36fcf passed the same shell-integration regression step.
  • ./tests/test_issue_5389_bash_prompt_status.sh
  • python3 tests/test_issue_5164_starship_prompt_composition.py
  • bash -n Resources/shell-integration/cmux-bash-integration.bash tests/test_issue_5389_bash_prompt_status.sh
  • ./scripts/reload-cloud.sh --tag sym5389 via Blacksmith macOS 26: build run 30884534432.
  • Launched the tagged build, drove workspace:1 / surface:1 through /tmp/cmux-debug-sym5389.sock, started interactive Bash, sourced the bundled integration, and put _cmux_prompt_command before an observer in both array and string PROMPT_COMMAND forms. After false, both observers printed status 1. Quit the tagged app with the prescribed pkill command and removed its stale tagged socket.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@austinywang, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c650a1c6-0e8f-4688-9a3a-59fcb722918d

📥 Commits

Reviewing files that changed from the base of the PR and between a9c351b and ee15d36.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • Resources/shell-integration/cmux-bash-integration.bash
  • tests/test_issue_5389_bash_prompt_status.sh

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.

@austinywang
austinywang marked this pull request as ready for review August 4, 2026 06:52
@lawrencecchen lawrencecchen added the stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening. label Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_cmux_prompt_command clobbers $? for downstream PROMPT_COMMAND hooks (breaks Starship status module)

3 participants