Commit 7e6995d
Hermes
fix(agent-core): allow benign session rewrites with different inode
Compaction rewrites session files via writeFile+rename, which always
creates a new inode. Previously, sessionFenceRewriteIsBenign rejected
such rewrites at the identity check (sameSessionFileIdentity), so the
content validation that follows never ran, causing
EmbeddedAttemptSessionTakeoverError false positives.
This change removes the inode identity gate from sessionFenceRewriteIsBenign
while preserving all content validation: file must exist, end with a
newline, append only valid transcript lines. A file with a different inode
but valid compaction-style content is indistinguishable from a compaction
from the agent's perspective, so the inode check was both too strict and
redundant with the content checks.
Fixes EmbeddedAttemptSessionTakeoverError during concurrent compaction.1 parent 2b61d38 commit 7e6995d
1 file changed
Lines changed: 0 additions & 1 deletion
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | 266 | | |
268 | 267 | | |
269 | 268 | | |
| |||
0 commit comments