mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-15 04:12:25 +00:00
fix(session): serialize JSONL transcript appends under existing lock
This commit is contained in:
parent
db84c1535d
commit
ecc909de38
1 changed files with 3 additions and 2 deletions
|
|
@ -1276,6 +1276,7 @@ class SessionStore:
|
||||||
|
|
||||||
# Also write legacy JSONL (keeps existing tooling working during transition)
|
# Also write legacy JSONL (keeps existing tooling working during transition)
|
||||||
transcript_path = self.get_transcript_path(session_id)
|
transcript_path = self.get_transcript_path(session_id)
|
||||||
|
with self._lock:
|
||||||
with open(transcript_path, "a", encoding="utf-8") as f:
|
with open(transcript_path, "a", encoding="utf-8") as f:
|
||||||
f.write(json.dumps(message, ensure_ascii=False) + "\n")
|
f.write(json.dumps(message, ensure_ascii=False) + "\n")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue