Skip to content

bug(platform): an answer refused for sandbox room after the cursor retarget loses the asking conversation #4719

Closed

Description

@yannickmonney

Summary

resumeWorkflowAgentTurnWithAnswerImpl delivers a person's answer to a parked automation agent node in this order (services/platform/backend/core/automations/agent_host.ts): ensure the session (L2104), retarget the run's agent cursor to a fresh exec id (L2208-2226, retargeted = true), stamp the launch, then start the harness exec through drainHarnessWindow (L2390-2397). A refusal for sandbox room settles with sandbox_capacity and carries undeliveredAskId plus the asking conversation's agentSessionId — but only when !retargeted (L2443-2450). Verified on main at 73d03a9.

The refusals that happen at exec start — the session runtime's session_memory_busy (SessionMemoryBusyError), the live-exec cap — all arrive after the retarget, so their settles drop both facts. The retarget does not record them on the cursor either (services/platform/backend/domains/automations/shim.ts:821-897). workflowAgentRetryResume (core/automations/agent_retry.ts:189-233) then has no ask to deliver and no handle to resume: the re-kick starts the node's conversation over, or resumes an older resumedFrom from an earlier retry. Nothing launched in either case, yet the conversation that asked the question is lost and the agent may ask again.

Suggested fix

A room refusal means nothing launched, before or after the retarget: carry undeliveredAskId and agentSessionId on every room-refusal settle (drop the !retargeted condition there), or record both on the cursor in retargetAgentCursor. Test: the exec start throws SessionMemoryBusyError after the retarget, and the re-kick resumes the asking conversation with the answer.

Activity

  1. added
    priority: medium
    bug
    service: platform
    on Oct 10, 2026
  2. added
    agent-ready
    on Oct 29, 2026
  3. added a commit that references this issue on Oct 30, 2026
    b51ce30
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

    agent-readybugpriority: mediumservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions