Skip to content

A person or a visitor who asks "is it done?" in a later message gets no answer: the later turn cannot read the earlier turn's delegated run, and on a public link the result never reaches the chat #4818

Backlog

Description

@webmixgamer

Summary

#4173 lets a turn read, by id, its own run and the runs it started, and lets the wake read the result it was woken for. Two cases stay open after it:

  1. A later turn of the same person cannot read a run an earlier turn of theirs started, when that run is on an agent the person cannot open.
  2. On a public link, the result of a delegated run that ends after the visitor's turn never reaches the visitor's chat. The wake runs and reads the result, and its reply stays on the wake's own run.

Part (a): a later turn of a person with an account

What happens. A person the agent is shared with asks the agent for work that the agent delegates to a second agent the person cannot open. The agent answers "started". In the next message the person asks "is it done?". That is a new turn. get_execution_result for the delegated run answers "Execution not found" (with the narrowed note), because the new turn did not start the run and the person cannot open the second agent. The agent can only say "still running".

Why. The delegated run's row records the person (source_user_id) and the calling agent (source_agent_name). A key acting for a person reads that person's rows only on an agent the person can open (dependencies.viewer_row_scope). #4173's exception is keyed on the turn that dispatched the run, so it does not carry over to a later turn.

Needs the operator's ruling. A rule here widens "the person must be able to open the agent". Proposed, for the ruling:

Questions for the ruling:

  1. Is result-only the right line, given Agent cannot read a child execution it started during a share holder's turn (404 Execution not found) #4173 gave the dispatching turn the transcript too?
  2. Does it hold for a Workspace turn, whose row carries the person's email and no user id?
  3. A room turn and a visitor's turn have no person on the row. Confirm they stay out of part (a).

Part (b): the result on a public link

What happens. A visitor on a public link asks for work the agent delegates with an async call. The receipt says a wake will come (wake: "on_ending"), so the agent ends its turn, as the delegation contract tells it to. The run ends, the wake turn starts and reads the result. The visitor's page still ends at the agent's first reply.

Why (read in the code on dev).

  • A wake's reply is written only into an agent chat thread of a person with an account: caller_wake_service._reply_thread returns no thread when the delegating turn has no source_user_id.
  • A delegated run's own report-back covers Slack, Telegram and the Workspace only (channel_completion_report._CHANNEL_RESOLVERS). A public-link turn carries no channel chat id.

So nothing brings a result that arrives after the turn back to a public-link chat.

Options.

  1. The wake's reply is written into the public chat session the delegation came from, and the page shows it.
  2. Or the receipt tells the agent the truth for such a turn: no wake will reach this conversation (wake: "none" with a reason of its own), so the agent waits inside the turn and reads the result with get_execution_result. That read works since Agent cannot read a child execution it started during a share holder's turn (404 Execution not found) #4173.

Option 2 is the smaller change. Option 1 is the better outcome for long runs, which outlive a turn.

Part (c): the rule until then

In a visitor's turn on a public link, read the result before the turn ends: pass wake: false and poll get_execution_result. This is in the user doc since #4173 (docs/user-docs/collaboration/agent-network.md).

Acceptance criteria

  • Part (a) has a recorded ruling, and either a rule with tests for each refusal or a stated "no" in docs/memory/architecture/security.md.
  • On a public link, a delegated result that arrives after the turn either appears in the visitor's chat, or the receipt of that turn says no wake will reach the conversation.
  • The delegation contract and the user doc say what a visitor's turn should do, and it matches the code.
  • Tests reach the line that decides each case (a later turn; a public-link wake).

Out of scope

Activity

  1. added
    priority-p2
    type-bug
    theme-security
    complexity-medium
    status-ready
    on Nov 27, 2026
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

    complexity-mediumpriority-p2status-readytheme-securitytype-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions