File tree Expand file tree Collapse file tree
src/agents/pi-embedded-runner/run Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,6 +293,14 @@ export async function createEmbeddedAttemptSessionLockController(params: {
293293 }
294294 const currentEpoch = getSessionWriteEpoch ( params . lockOptions . sessionFile ) ;
295295 if ( currentEpoch > fenceWriteEpoch + 1 ) {
296+ // Epoch advanced by more than our own reacquire — at least one other
297+ // in-process lock holder (heartbeat, cron, channel) wrote during the
298+ // prompt I/O window. Accept the change and re-baseline.
299+ //
300+ // Trade-off: an external lock-bypassing write in the same window would
301+ // also be accepted. This is intentional — external bypasses already
302+ // violate the lock contract, and rejecting co-tenant writes would
303+ // recreate the session-stall regression (#84071).
296304 fenceFingerprint = current ;
297305 fenceWriteEpoch = currentEpoch ;
298306 return ;
You can’t perform that action at this time.
0 commit comments