Skip to content

fix(bindings): surface pre-exec failures in stderr for Python/JS#625

Closed
chaliy wants to merge 1 commit intomainfrom
claude/issue-606-pre-exec-stderr-bToqT
Closed

fix(bindings): surface pre-exec failures in stderr for Python/JS#625
chaliy wants to merge 1 commit intomainfrom
claude/issue-606-pre-exec-stderr-bToqT

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Mar 14, 2026

Summary

  • Pre-exec failures (parse errors, resource limits) only populated error field, leaving stderr empty
  • Agent integrations only read stdout/stderr, so errors were silently lost
  • Fix: copy error message into stderr in both Python and JS Rust bindings
  • Update deepagents.py and pydantic_ai.py to surface result.error

Test plan

  • 3 new Python tests confirming pre-exec errors appear in stderr
  • 2 new JS tests confirming pre-exec errors appear in stderr
  • cargo clippy, cargo fmt clean
  • ruff check, ruff format clean

Closes #606

…grations

Pre-exec failures (parse errors, resource limits) were only stored in
the `error` field with an empty `stderr`. Agent integrations like
deepagents.py and pydantic_ai.py ignored `result.error`, leading to
opaque failures. Now the error message is copied into `stderr` in both
Python and JS bindings, and both agent integrations surface `result.error`.

Closes #606
@chaliy chaliy force-pushed the claude/issue-606-pre-exec-stderr-bToqT branch from 08b36dd to b6c3e87 Compare March 14, 2026 22:01
chaliy added a commit that referenced this pull request Mar 14, 2026
- fix(bindings): surface pre-exec failures in stderr for Python/JS (#625)
- docs(tool): add bash-vs-sh, chunked writes, limits to agent prompt (#608)
- feat(jq): bump reported version to jq-1.8, add trim/abs/if tests (#616)
- feat(awk): implement --csv flag with RFC 4180 field splitting (#617, #618)
@chaliy
Copy link
Contributor Author

chaliy commented Mar 14, 2026

Superseded by #631 which includes the fix plus resolves the Python test failures.

@chaliy chaliy closed this Mar 14, 2026
yonas pushed a commit to yonasBSD/bashkit that referenced this pull request Mar 15, 2026
)

## Summary

- **fix(bindings)**: Surface pre-exec failures (parse errors) in
`stderr` for Python and JS bindings — previously only populated the
`error` field, leaving `stderr` empty. Fixes everruns#606, supersedes everruns#625.
- **docs(tool)**: Add operational guidance to the agent-facing system
prompt: bash-vs-sh semantics, `source` usage, chunked multi-file writes,
and configured limits. Fixes everruns#608.
- **feat(jq)**: Bump reported version from `jq-1.7.1` to `jq-1.8`. Add
tests for `trim`, `ltrim`, `rtrim`, `abs`, and `if` without `else` (jq
1.8 features supported by jaq 2.2.1). Addresses everruns#616.
- **feat(awk)**: Implement `--csv` / `-k` flag with RFC 4180 field
splitting (quoted fields, embedded commas, double-quote escaping). Sets
`FS=","` and `OFS=","` in CSV mode. Fixes everruns#618, addresses everruns#617.

## Test plan

- [x] All 8 new awk CSV tests pass
- [x] All 6 new jq 1.8 tests pass (version, abs, trim, ltrim, rtrim,
if-without-else)
- [x] Tool system prompt test verifies bash-vs-sh guidance and limits
surfacing
- [x] `cargo fmt --check` clean
- [x] `cargo clippy --all-targets --all-features -- -D warnings` clean
- [x] `cargo test --all-features` passes (2 pre-existing doctest
failures in realfs unrelated)
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.

bug(bindings): pre-exec failures disappear from stderr in Python/JS integrations

1 participant