[Feature]: Separated stdout/stderr provenance and termination signal telemetry in TerminalObservation
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by locating TerminalSession, CmdOutputMetadata, and TerminalObservation, then trace how command output is captured and rendered by to_llm_content. Check the existing terminal tests and run the relevant suite before changing behavior. Done means separated streams are represented and labeled when available, bracketed-paste sequences are removed, and detectable signal termination is distinct from normal exit status 143.
Written by the indexing model from the issue text.
Description
Is there an existing feature request for this?
- I have searched existing issues and feature requests, and this is not a duplicate.
Problem or Use Case
TerminalSession captures command output from a merged PTY/tmux screen buffer and reads exit status solely via shell $?. This creates two observability blind spots for agents diagnosing build/ops pipelines:
- Lost
stdoutvs.stderrprovenance: Diagnostic warnings written tostderrare interleaved indistinguishably with structuredstdoutdata (alongside bracketed-paste ANSI sequences like\x1b[?2004l). On TraceTrial-Bench (arXiv:2610.32285, nodeE2), OpenHands scored6.7%onE2-shard-stderr-003becausestderrdiagnostics could not be distinguished fromstdout. - Ambiguous signal death (
128 + SIG): When a child process dies fromSIGTERM(15), bash reports$? = 143— identical to a process callingexit(143)normally (E1-drainexit-001,hr_signal_death_is_distinguishable_from_normal_exit=False).
Desired Behavior
- Add optional fields on
CmdOutputMetadata/TerminalObservation:stdout: str | None = Noneandstderr: str | None = None(populated when using a non-PTY/subprocess execution mode or sidecar stderr capture)termination_signal: str | int | None = None(when the command was terminated by a signal rather than normalexit())
- Strip terminal-injected bracketed-paste control sequences (
\x1b[?2004h/\x1b[?2004l) from captured command output so cleanstdoutpayloads are not corrupted.
Acceptance Criteria
- Subprocess / non-interactive terminal execution (or opt-in stream separation) populates distinct
stdoutandstderrfields onTerminalObservationand labelsstderrclearly into_llm_content - Bracketed-paste ANSI control sequences injected by the shell wrapper are stripped from captured output
- Signal-terminated commands surface signal identity when detectable, distinguishing
SIGTERMdeath from normalexit 143
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 797
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 354
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenHands/software-agent-sdk
-
[Bug]: `list_directory` reports a complete listing as truncated when a directory has exactly 500 entriesPossibly taken @balabommablock-cpu claimed this 29 days ago. Openbug priority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
OpenHands/software-agent-sdk#6133 ·
Maintainers usually reply within 1 day
-
[Bug]: Command hook that exits 1 is treated as blocking when its stdout is a JSON `deny` or `continue: false`Possibly taken A pull request linked to this issue is open or already merged. Openbug priority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenHands/software-agent-sdk#6116 · 3 comments ·
Maintainers usually reply within 1 day
-
[Bug]: TypeScript GET-with-body requests remain pending after a truncated responsePossibly taken @BlueRaddish claimed this 34 days ago. Openbug priority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
OpenHands/software-agent-sdk#6059 ·
Maintainers usually reply within 1 day
-
[Bug]: Document whether `prompt_tokens` includes `cache_read_tokens` in accumulated token usagePossibly taken @Jaxon1216 claimed this 36 days ago. Openpriority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OpenHands/software-agent-sdk#5975 ·
Maintainers usually reply within 1 day
-
priority:low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OpenHands/software-agent-sdk#5708 · 1 comment ·
Maintainers usually reply within 1 day
All issues in OpenHands/software-agent-sdk
Similar issues
-
[Bug]: reme CLI crashes when the running server used a relative config pathPossibly taken @nurlanmnn claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/ReMe#770 ·
Maintainers usually reply within 1 day
-
Pi: paused model calls are reported as "not signed in" when the model's provider comes from an extensionPossibly taken @balcsida claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
microsoft/TokenEconomizer#288 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 67/100
sickn33/agentic-awesome-skills#2437 ·
Maintainers usually reply within 1 day
-
site-bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ethereum/consensus-specs#5846 ·
Maintainers usually reply within 1 day