Can the agent distinguish stdout and stderr?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 64/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- devtools, testing-qa
Research direction
Start in src/programbench/container.py around line 85, where the container execution helper appears to merge stdout and stderr. Reproduce the behavior with the cmatrix evaluation case in eval/tests/test_cmatrix.py:120 and compare the observed streams with the command’s actual output. Done means the intended stdout/stderr behavior is clear and the default agent observation no longer obscures the distinction, with relevant evaluation behavior checked.
Written by the indexing model from the issue text.
Description
Hi!
I find that some test functions failed against a generated executable because the test expected to have some string in stderr, while the executable gave that string in stdout.
I also noticed that ProgramBench’s container execution helper appears to merge stdout/stderr streams here.
Is stdout/stderr separation intentionally unavailable to agents during exploration? (I think it is still possible for an agent to manually test stream placement with shell redirection, e.g. cmd >/tmp/out 2>/tmp/err, but the default observation format seems to make the distinction easy to miss.)
Thank you!
The commands I ran
uv run --with mini-swe-agent mini-extra programbench \
--filter "abishekvashok__cmatrix.5c082c6" \
--output output \
--model openai/gpt-5.4
uv run programbench eval output
Score log
Evaluation Summary
Instance Score Comment
abishekvashok__cmatrix.5c082c6 94 507 tests
Average 94 1 instances
A failed test in eval.json
- task:
abishekvashok/cmatrix - test function name:
eval.tests.test_cmatrix.TestColorOptions.test_color_invalid_shows_error_message - branch:
1b991a57d4e9
self = <test_cmatrix.TestColorOptions object at 0x7732071f2bf0>
def test_color_invalid_shows_error_message(self):
"""Test invalid color name produces error message."""
result = run("-C", "purple")
assert result.returncode == 0 # Exits with 0 but shows error
> assert b"Invalid color" in result.stderr
E AssertionError: assert b'Invalid color' in b''
E + where b'' = CompletedProcess(args=['./executable', '-C', 'purple'], returncode=0, stdout=b' Invalid color selection\n Valid colors are green, red, blue, white, yellow, cyan, magenta and black.\n', stderr=b'').stderr
eval/tests/test_cmatrix.py:120: AssertionError
- Dominant language
- Python
- Stars
- 928
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Contributor 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 facebookresearch/ProgramBench
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
All issues in facebookresearch/ProgramBench
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100