Skip to content

fix(agents): paused child Action keeps its parent counted as active #563

Closed

Description

@lastobelus

A parent waiting for a child-owned resumable Action prevents Environment Pause from reaching its quiet state, even after the command has ended and its continuation is durably held. This blocks the normal Resume path during installed Phase 3 acceptance for #482.

Reproduced on 0.1.7-nightly.20261101.4016 (7179625fccad) using the packaged server and bundled web client in isolated state.

  1. Delegate an app-owned child. Let it launch an opted-in Action and end its turn while the Action runs. The logical task correctly stays unfinished.
  2. Pause the environment and let both threads finish their pause messages.
  3. Finish the Action. Its exact automatic continuation is accepted as delivery:delivered, remains queued and does not start.
  4. Read Pause status and open its dialog. There are no running provider turns or command processes, but the parent is still reported as thread-background, status:working. The dialog shows 1 active thread remaining, Background work, Cancel pause and Pause remaining threads, with no normal Resume.
  5. Restart the isolated packaged server. The same Pause session and same queued continuation survive, but the parent still prevents quiet status.

Expected: when the remaining logical work is entirely held by this environment Pause, the environment can report quiet without declaring the child task complete, and offer normal Resume. Actual execution or an unpaused dependency must continue to block quiet.

Recovery: Cancel pause successfully released the same continuation. The command ran once, the task retained its identity, and one actual final result and parent notification arrived. This is a Pause activity-accounting defect, not lost Action delivery or premature completion.

Likely owner: apps/server/src/environment/EnvironmentPauseActivity.ts (activeBackgroundWork) and the matching thread-background blocker filtering in EnvironmentPause.ts. The current Pause exemption handles PR-watch monitors but not an app-owned task whose only remaining work is a Pause-deferred continuation. A repair must retain real nested/background work as blockers rather than exempting all delegated tasks.

Phase 3 installed acceptance remains unpassed; the three required local provider pairs and both rounds passed separately. No production state or source was changed for this reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions