Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jan 26, 2026

What This Means for Users

Simplified Configuration

Two settings removed from Settings UI:

  • Max File Read Lines - You no longer need to configure a global line limit. The agent now reads what it needs intelligently.
  • Max Concurrent File Reads - This setting is no longer used and has been cleaned up.

Smarter File Reading

The read_file tool now uses indentation-aware reading that understands code structure:

  • When reading a function, method, or class, the agent automatically includes the complete logical block
  • Sibling context (nearby functions/methods at the same indentation level) is included for better understanding
  • No more truncated code blocks that cut off mid-function

Per-Request Control

Instead of a global setting, the agent can now specify limits per request when needed:

  • Most reads use smart defaults with no limit
  • When appropriate, specific calls can request limited output
  • This eliminates the need for users to guess at "good" global values

What Changed Technically

  • read_file tool redesigned to use single-file API with indentation mode (adapted from Codex CLI)
  • Removed maxReadFileLine global setting (replaced by per-call limit parameter)
  • Removed unused maxConcurrentFileReads setting and plumbing
  • Cleaned up related dead code from system prompts and state management

Breaking Changes

  • Users who had customized maxReadFileLine will need to rely on the new intelligent defaults
  • The setting will no longer appear in exported configurations

- Replace multi-file read_file with single-file-per-call design
- Add two reading modes: slice (default) and indentation
- Implement bidirectional expansion algorithm for indentation mode
- Add line truncation (500 chars) and limit (2000 lines default)
- Remove legacy token-budget-based reading approach
- Remove maxReadFileLine setting (replaced by limit parameter)
- Add new IndentationParams and ReadFileParams types
- Clean up stale FileEntry/LineRange types and helpers

Known limitations:
- Lines >500 chars are truncated (content lost)
- No server-side max limit enforcement
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jan 26, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 26, 2026

Oroocle Clock   See task on Roo Cloud

Re-review complete. No new issues found in the latest commit.

  • read_file: wire up indentation.max_lines through nativeArgs parsing so it reaches the tool implementation
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

This setting was never used after removing the batch file reading
system. Removes dead code from UI, state management, and types.
- Fix formatPathTooltip to add space before additionalContent (fixes display bug where 'index.ts' + 'up to 50 lines' showed as 'index.tsup to 50 lines')
- Add startLine field to ClineSayTool type for read_file operations
- Update ReadFileTool to include startLine in the message
- Update ChatRow to pass startLine to openFile for navigation to the correct line
@hannesrudolph hannesrudolph changed the title refactor(read_file): Codex-inspired indentation mode with simplified API refactor(read_file): Codex-inspired read_file refactor Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants