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 system pause overwrites an operator pause — pause_agent has no already-paused guard (quota and auth paths) #21056
ControlsService.pause_agent (autobot-backend/llc/services/controls_service.py:87) has no guard for an agent that is already paused. Each call overwrites pause_reason, paused_at and pre_pause_status (it stores the current status, which is already paused), and logs a new CONTROL_AGENT_PAUSED event.
Scenario:
An operator pauses an agent while it has a run in flight.
The system pause overwrites the operator's reason and the pre-pause status.
A later resume_agent restores from the overwritten state. The operator's pause, and the status it recorded, are lost.
Found in review of PR #21055 (#20202). Both system-pause paths share the defect, so one fix covers both.
Acceptance criteria
pause_agent on an already-paused agent keeps the first pre_pause_status and the operator's pause_reason. Either it is a no-op that returns the existing pause, or it records the extra reason without overwriting.
A system pause never overrides an operator pause. Resuming an agent the operator paused restores the status from before the operator's pause.
Maintainer decision: when an agent is already paused, a further pause request is a no-op. The first pause's reason and pre-pause status are kept, so a resume restores the status from before the first pause. The repeat is recorded in the activity log as a no-op, with the requested reason and actor in its metadata. This is fixed once in pause_agent, and covers the quota and auth paths. Sequenced after #21055.
Activity
github-actions commentedon Nov 7, 2026
needs-structurecleared: goal milestone, matching phase label and native parent (or sub-issues) are all present (#19522).mrveiss commentedon Nov 7, 2026
Maintainer decision: when an agent is already paused, a further pause request is a no-op. The first pause's reason and pre-pause status are kept, so a resume restores the status from before the first pause. The repeat is recorded in the activity log as a no-op, with the requested reason and actor in its metadata. This is fixed once in
pause_agent, and covers the quota and auth paths. Sequenced after #21055.fix(company-os): pause_agent is one conditional UPDATE and refuses a …
fix(company-os): the Migration Gate filter covers controls_service, w…
fix(company-os): pin controls_service in the Migration Gate entries (#…
fix(company-os): a repeated pause keeps the first pause (mrveiss#21056)
mrveiss commentedon Nov 20, 2026
AC audit against main 13685f3 (2026-11-20). A branch deleted as ZERO means its content is on main; it does not by itself meet the ACs.
PR #21213 closed, branch deleted as ZERO.
autobot-backend/llc/services/controls_service.py:109-113,152-162keeps the first pause;llc/tests/test_pause_already_paused_21056.py:86.CONTROL_AGENT_PAUSE_REPEATED(test :100-115), no second "paused" event.All ACs met; closing.