Deleting RLM subagents races with completion on Windows: repeated EPERM and a hidden live session #1935
telemetrya2018-dotcom
started this conversation in
Bug reports
Replies: 1 comment
|
Additional reproducible lifecycle/reply-tracking inconsistency:
So the completion monitor reported a false negative: daemon CLI delivery succeeded, but RLM reply tracking did not recognize that delivery path (or did not reconcile it before cleanup). No report data was lost. This is another example of the daemon/RLM/UI lifecycle views disagreeing. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
On Windows with Prime Agent
0.8.1, deleting an RLM child can race with child completion/state persistence. The atomic write ofrlm-subagent.jsonrepeatedly fails withEPERM. A child can disappear fromrlm.list_subagents()while its daemon session remainslive, causing repeated cleanup errors and delayed failure notifications.This was reproduced with two different children in one parent session. One child produced multiple new
EPERMevents even afterdelete_subagent()had returned successfully.Error
Sanitized path:
Observed behavior
Child A
EPERMduring temp-file rename.rlm.delete_subagent(childId)succeeded immediately.Child B
delete_subagent()returned success, but the returned object still reportedstatus="running".rlm.list_subagents().EPERMerrors with distinct.tmp-<pid>-<timestamp>filenames.prime-agent list --all --jsonstill showed the supposedly deleted child session as:{ "lifecycle": "live", "activity": "idle", "runtimeKind": "subagent", "taskState": "needs_input" }rlm-subagent.jsonalso remained stale with"status": "running".That returned
success: trueand changed the session lifecycle toarchived.No temporary
.tmp-*files remained after the successful retry, but state across the RLM roster, daemon session registry, and metadata file was inconsistent.Likely race
The evidence is consistent with a race between:
This is a hypothesis about the code path, not a claim about which process held the file handle.
Steps to reproduce
await rlm.delete_subagent(child)while completion/final messaging is in flight.EPERMrename failure forrlm-subagent.json.tmp-* -> rlm-subagent.json.rlm.list_subagents()withprime-agent list --all --json.The race may be easier to reproduce when Windows Defender, indexing, or another reader briefly opens the metadata file, but no handle owner was proven in this report.
Expected behavior
delete_subagent()is idempotent and does not return until the child is stopped or durably marked deleted.EPERM/EACCES/EBUSYfailures with bounded backoff.Related reports
This appears to be a new subagent-deletion path, but similar Windows rename/locking classes were reported in:
Environment
0.8.1All reactions