You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(company-os): a run-identity mismatch ends the run as COMPLETED, so a reused PID or stamp drift is billed and revoked as a success #21069
The bug: probe_pid_identity (autobot-backend/llc/adapters/subprocess_support.py) returns COMPLETED when a live PID's identity does not match the stamp recorded at spawn (PID reuse, or stamp drift). PR #21068 adds a WARNING for this case, but the status is unchanged.
What happens then:
The scheduler revokes the run key and reads usage.
The claude_code adapter parses the output as a clean success.
With no result event in the output, the run is billed and recorded as successful even though it never finished.
Shipping the warning first was deliberate, because #20466's cause is not yet established on the host.
Acceptance criteria
An identity mismatch where the output holds no result event ends the run as FAILED (or lost), with an identity-mismatch reason, not COMPLETED.
An identity mismatch where a result event is present keeps today's parse. The process finished; only its PID was reused.
Usage is not ingested as a success for a run that ended this way (test).
Tests cover both branches, plus PID reuse with a live unrelated process.
Maintainer decision: when a run's process identity does not match and the run wrote no result, it ends FAILED with a fixed reason ("run process identity mismatch (PID reused or stamp drift) - no exit result recorded"). It reuses the existing FAILED status, adds no new status and needs no migration, and the run is not billed as a success. A run that did write a result event keeps today's parse. Sequenced after #21068 and #20912.
Activity
mrveiss commentedon Nov 7, 2026
Maintainer decision: when a run's process identity does not match and the run wrote no result, it ends FAILED with a fixed reason ("run process identity mismatch (PID reused or stamp drift) - no exit result recorded"). It reuses the existing FAILED status, adds no new status and needs no migration, and the run is not billed as a success. A run that did write a result event keeps today's parse. Sequenced after #21068 and #20912.