mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
## Why Memory clients sometimes need to continue reading a file from a known line instead of starting over from the top. Adding a line offset to the `read` MCP keeps that resume logic simple and avoids re-reading already-consumed content. ## What changed - Added an optional `line_offset` argument to the memory `read` tool, defaulting to `1`. - Read content starting at the requested 1-indexed line before token truncation, and return `start_line_number` in the response. - Treat invalid offsets as invalid params errors and cover the new behavior in `codex-rs/memories/mcp/src/local_tests.rs`. ## Testing - Added unit tests for reading from a non-default starting line. - Added unit tests for rejecting `0` and past-end line offsets.