Restart a file read when the saved version changes

Read one saved snapshot from the beginning when file or manifest versions change between chunks.

A saved-file read can return several chunks. Check version and manifestVersion on each response before combining the content.

Restart from the beginning

  1. If either version changes between responses, discard the chunks collected for that read.

  2. Use altifigence.workspace.files.list for the same project and choose the current returned path.

  3. Call altifigence.workspace.file.read for that project and path with offset set to 0. Keep the same encoding for the whole read.

  4. Continue using each returned nextOffset. Check that version and manifestVersion remain unchanged from the first response, and stop when nextOffset is null. If either version changes again, restart the read.

Use the saved snapshot

Keep the project, path and file version with your summary so you can identify the saved content used. Save an edit in Cloud before asking the client to read that edit.

Continuation offsets depend on the encoding. Use the returned nextOffset rather than calculating the next position from the displayed content.

MCP connection and first read

ChatGPT connection guide