Skip to content

fix(models): bound provider-facing observation output - #878

Open
snvtac wants to merge 1 commit into
SWE-agent:mainfrom
snvtac:snvtac/873-large-shell-output-bound
Open

fix(models): bound provider-facing observation output#878
snvtac wants to merge 1 commit into
SWE-agent:mainfrom
snvtac:snvtac/873-large-shell-output-bound

Conversation

@snvtac

@snvtac snvtac commented Jun 26, 2026

Copy link
Copy Markdown

Summary

  • Add a shared observation utility that bounds provider-facing command output while preserving the original extra.raw_output for local trajectory/debug use.
  • Apply the bound before rendering observations for tool calls, Responses API tool calls, and text-based observations.
  • Add regression coverage for large stdout, retry-amplified provider payloads, the real mini.yaml observation template, and provider message preparation stripping extra.raw_output.

Fixes #873

Validation

  • uv run pytest tests/models/test_observation_truncation.py
  • uv run pytest tests/models -n auto -> 140 passed, 1 warning
  • uv run pytest -n auto -> 536 passed, 76 skipped, 1 warning
  • uv run ruff check src tests
  • uv run ruff format --check src tests
  • uv run pylint src/minisweagent --errors-only
  • git diff --check

Notes

Validation used a repo-local .venv and .uv-cache; both were removed after verification along with ignored test/lint caches.

@klieret

klieret commented Jun 29, 2026

Copy link
Copy Markdown
Member

But we can already truncate observations with the jinja templates, why is this needed?

@klieret

klieret commented Jun 29, 2026

Copy link
Copy Markdown
Member

see the .yaml configs

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.

mini-swe-agent forwards large shell output back to the provider

2 participants