File locking for concurrent trajectory JSONL writes

NousResearch/hermes-agent · cluster 12684 · agent

Data as of

Nothing open on GitHub. Fix merged in #109192. Check it covers your case.

The short answer

0open issues
0open PRs
5items grouped
Known?
Yes. 5 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #109192. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #109192. That is separate from the fix event.
Still open
Nothing open on GitHub.

A bug report and multiple fix attempts addressing the lack of file locking in save_trajectory(), which can cause JSONL output corruption when multiple processes write concurrently. Members propose using fcntl.flock or similar mechanisms as a remedy.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #109192 fix(agent): concurrent save_trajectory() appends no longer corrupt the JSONL (#12684, salvage #12685)

    merged to main

    files: agent/trajectory.py, contributors/emails/[redacted:email], tests/agent/test_trajectory_file_locking.py

3 PRs closed without merging

From the close comments: done elsewhere 1 · merged via another change 1 · stale or abandoned 1

  • #12685 fix(agent): add fcntl.flock to save_trajectory to prevent JSONL corru… · merged via another change → 330004e, #109192
  • #12713 fix(trajectory): add file locking to prevent JSONL corruption under concurrent writes · stale or abandoned
  • #13218 fix(trajectory): add file locking to save_trajectory() to prevent concurrent JSONL corruption · done elsewhere → 330004e, #109192
Closed issues · 1
  • Closed#12684[Bug]: save_trajectory() has no file locking — concurrent processes corrupt JSONL output
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.40: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Subsystem
agent
Merged PRs
#109192
Closed issues
1
Attempts
3 PRs closed without merging
Fix link checked
12 Sep 2026

For your agent

The same facts, typed.