Problem
When using the Conductor SDK's file read tool in an agentic context, there's no way to limit how much of a file is read. Large files can:
- Exhaust the context window
- Increase token costs unnecessarily
- Slow down agent iterations
Concrete example from foreman: The implementing stage reads source files during code analysis. A 10,000 line file consumes excessive tokens when only the first 500 lines are relevant.
Proposal
Add configurable line limits to file read operations:
// Option 1: Tool-level configuration
tool := sdk.FileReadTool(sdk.WithMaxLines(500))
// Option 2: Per-call parameter in tool schema
{
"name": "read",
"parameters": {
"path": "/path/to/file.ts",
"max_lines": 500, // Optional, default unlimited
"offset": 0 // Optional, start from line N
}
}
General Utility
- Code analysis agents - Any agent reading source files benefits from bounded reads
- Log analysis - Reading recent log entries without loading entire files
- Document processing - Preview/summary workflows that only need file headers
Acceptance Criteria
Priority
High / Blocking - Foreman implementation blocked until this lands.
Labels
enhancement, sdk, priority:high
Problem
When using the Conductor SDK's file read tool in an agentic context, there's no way to limit how much of a file is read. Large files can:
Concrete example from foreman: The implementing stage reads source files during code analysis. A 10,000 line file consumes excessive tokens when only the first 500 lines are relevant.
Proposal
Add configurable line limits to file read operations:
General Utility
Acceptance Criteria
max_linesparameteroffsetparameterPriority
High / Blocking - Foreman implementation blocked until this lands.
Labels
enhancement, sdk, priority:high