-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Description
Is there an existing issue for the same bug? (If one exists, thumbs up or comment on the issue instead).
- I have checked the existing issues.
Describe the bug and reproduction steps
Bug Description:
There is a bug in the [move_back] method of the [RollingLogger] class in /openhands/core/logger.py. The method accepts an [amount] parameter to specify how many lines to move the cursor back, but it incorrectly uses self.max_lines instead of the calculated [amount] value in the actual cursor movement operation.
Code Location:
File: openhands/core/logger.py
Method: RollingLogger.move_back()
Expected Behavior:
When calling [move_back(5)], the cursor should move back exactly 5 lines.
Actual Behavior:
When calling [move_back(5)], the cursor moves back self.max_lines lines instead of 5 lines, because the method ignores the [amount] parameter in the actual implementation.
Reproduction Steps:
- Create a [RollingLogger] instance with max_lines=10
- Call [move_back(3)]
- Observe that the cursor moves back 10 lines instead of 3 lines
Impact:
This bug affects the debugging experience when using the rolling logger, as the cursor positioning becomes incorrect when custom amounts are specified.
OpenHands Installation
Docker command in README
OpenHands Version
main
Model Name
claude-3-7-sonnet-20250219
Operating System
MacOS
Logs, Errors, Screenshots, and Additional Context
No response