Summary
When a foreground bash command is detached to background (ctrl+b), the StdoutPipe + Wait handoff after detach can race and truncate the command's trailing output (#684). Minor robustness follow-up.
Steps to Reproduce
- Run a bash command that emits output right up to the moment it exits.
- Detach it to background mid-run (
ctrl+b).
- Read the shell output via
BashOutput / /tasks; trailing lines emitted near process exit can be missing.
Expected Behavior
All output up to process exit is captured and readable after a detach.
Actual Behavior
Trailing output can be truncated due to a StdoutPipe + Wait race in the detach handoff.
Notes
Summary
When a foreground bash command is detached to background (
ctrl+b), theStdoutPipe+Waithandoff after detach can race and truncate the command's trailing output (#684). Minor robustness follow-up.Steps to Reproduce
ctrl+b).BashOutput//tasks; trailing lines emitted near process exit can be missing.Expected Behavior
All output up to process exit is captured and readable after a detach.
Actual Behavior
Trailing output can be truncated due to a
StdoutPipe+Waitrace in the detach handoff.Notes
internal/agent/tools/bash*.go) andinternal/services/background_shell_service.go.