Skip to content

Fix: Search for session marker at file beginning instead of end#29

Open
mzdbxqh wants to merge 1 commit intoMartian-Engineering:mainfrom
mzdbxqh:fix-marker-search-read-beginning
Open

Fix: Search for session marker at file beginning instead of end#29
mzdbxqh wants to merge 1 commit intoMartian-Engineering:mainfrom
mzdbxqh:fix-marker-search-read-beginning

Conversation

@mzdbxqh
Copy link

@mzdbxqh mzdbxqh commented Feb 25, 2026

The find_jsonl_by_marker() function was reading the last 50KB of JSONL files to find session markers, but markers are written at session start and appear at the beginning of the file.

For long-running workers that generate >50KB of logs, the marker would be outside the search window, causing session discovery to fail.

This fix changes the search to read the first 50KB instead, where the marker is actually located.

The find_jsonl_by_marker() function was reading the last 50KB of JSONL
files to find session markers, but markers are written at session start
and appear at the beginning of the file.

For long-running workers that generate >50KB of logs, the marker would
be outside the search window, causing session discovery to fail.

This fix changes the search to read the first 50KB instead, where the
marker is actually located.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant