I'd like to pick up the read offset=0 issue — checking the fix direction #3
|
Hi! I saw the issue about the read tool's offset=0 bug and I'd like to take a stab at fixing it. My plan: explicitly check Does this direction sound good, or would you prefer silently treating offset=0 as 1? |
Replies: 1 comment
|
Hi @Evan-bunny, thanks for picking this up! Your direction is exactly right — rejecting Also agreed on the One request: please include the two regression tests ( |
Hi @Evan-bunny, thanks for picking this up!
Your direction is exactly right — rejecting
offset=0with a clear error is preferable to silently treating it as 1, since a 0 usually indicates a caller-side mistake that the caller (an LLM, in this case) should be told about so it can correct itself. The error message you proposed (explaining the 1-indexed convention and mentioning negative offsets) looks good.Also agreed on the
limit=0note: skipping the continuation note when no lines are returned is the right fix.One request: please include the two regression tests (
offset=0andlimit=0) intests/test_tools.py— you can follow the style of the existingtest_read_offset_beyond_eofcase. Oth…