Skip to content

Preserve truncated output recovery details#1709

Open
biefan wants to merge 1 commit intoopeninterpreter:mainfrom
biefan:fix-truncate-output-recovery
Open

Preserve truncated output recovery details#1709
biefan wants to merge 1 commit intoopeninterpreter:mainfrom
biefan:fix-truncate-output-recovery

Conversation

@biefan
Copy link

@biefan biefan commented Mar 14, 2026

Summary

  • measure truncation based on visible characters so ANSI escape sequences do not trigger premature truncation
  • save the full output to a temp file before truncating it
  • replace the broken computer.ai.summarize(result) advice with shell commands users can actually run
  • add regression tests for ANSI-heavy output and temp-file recovery

Testing

  • uv run --python 3.11 --with pytest python -m pytest tests/core/utils/test_truncate_output.py -q
  • python3 -m py_compile interpreter/core/utils/truncate_output.py tests/core/utils/test_truncate_output.py

Closes #1695

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: truncated command output permanently lost, message references non-existent method

1 participant