Skip to content

bug(wake): a wake turn is cut off from the chat that delegated — the person never sees its reply and the agent loses the plan #4537

Open

Description

@obasilakis

Summary

A wake turn is cut off from the conversation that caused it. The person sees nothing, and the agent does not know why it was woken beyond the wake frame.

  1. The reply never reaches the person. When a person asks an agent in chat to "ask X and tell me what it said once it's done", the agent delegates asynchronously and replies "I'll be woken when it ends and can then report what it said". The wake turn runs and answers correctly, but its reply exists only on the execution row (Tasks tab). Nothing posts it to the chat the person asked in. The same holds for a wake on an answered ask, unless the person opened the ask's Discuss chat.
  2. The agent has lost the plan. The wake turn is a fresh session that carries only the wake frame. A plan made in the delegating chat turn ("when the answer arrives I'll append it to numbers.txt and ask for the next one") is not available to it. In testing, the wake turn reported the number and stopped. It never ran the next step.

Found in v1.0.5 release testing, row A5 (delegation autonomy), build v1.0.5-rc2 (af465288a).

Evidence

  • Agent chat history: 12 messages, all person turns and their inline replies. 5 wake turns (3 caller_wake, 1 operator_response, 1 operator_ending) wrote zero rows to chat_messages, and none to Workspace messages.
  • Code: no add_chat_message writer exists on the wake path. caller_wake_service dispatches through dispatch_and_await_terminal with no destination. operator_resume_service._workspace_destination attaches one only for an ask's Workspace Discuss chat.
  • Plan loss: the delegating chat turn said it would continue on wake. The caller_wake turn's response was "its only output was "47" … I can't tell you what it refers to".
  • Compounded by ent#1216: inside the wake turn, get_execution_result returns 404 and list_recent_executions is empty, so the agent cannot read more than the frame's summary.

Expected

The wake is the last step of a delegation the person started. The person should see the agent's next message where they asked, and the woken agent should have the delegating turn's context (or at least the person's request) to continue from.

Fix-vs-note: release note for v1.0.5 ("a delegated result appears in the agent's Tasks, not in chat; standing instructions, not a chat promise, drive autonomous loops"). Fix after the release.

Activity

  1. added
    priority-p2
    type-bug
    theme-reliability
    on Nov 13, 2026
  2. dolho commented on Nov 16, 2026

    @dolho
    Contributor

    /claim

  3. added
    status-in-progress
    on Nov 16, 2026
  4. github-actions commented on Nov 16, 2026

    @github-actions

    Claimed by @dolho. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/4537-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #4537
  5. added
    complexity-medium
    on Nov 18, 2026
  6. webmixgamer commented on Nov 23, 2026

    @webmixgamer
    Contributor

    One more caller for this: a scheduled run that needs a delegated answer

    The issue describes a person's chat turn. On a client instance (v1.0.5) most delegating turns are scheduled report runs. For them the wake cannot be the continuation, with or without the chat link.

    The case. One scheduled run pulls data, asks a knowledge agent a question, writes a report and delivers it. The schedule pins the model and sets the time limit. Retries and the delivery check are built on "one run = one report".

    If that run ended at the receipt, as the delegation contract says:

    1. The run would be recorded success before the report exists. The schedule's retry and validation would judge an unfinished run.
    2. The wake would run on the agent's own model, not on the model the schedule pins. This is the decision of bug: platform-started turns (wakes, reminders, operator answers) run on a different model than the agent's configured one #4442, held by tests/unit/test_4442_wake_model.py::test_wake_producers_pass_no_model.
    3. The wake has no session and no skill state of the scheduled run. It starts from the wake message.
    4. A wake that fails has no retry. We saw one fail at capacity ("Agent at capacity (3/3 parallel tasks running)").

    So these runs keep waiting for the answer inside the turn, and each of them now also gets a wake turn for work that is already done (#4538).

    PR #4606. By its description it gives the wake message the request and the reply of the delegating turn, and it posts the wake's reply into the agent chat thread when a person's chat turn delegated. That helps point 3 for a scheduled run whose callee row has the link. Points 1, 2 and 4 stay. A callee row with no link, for example a REST call without the turn header, keeps the old message.

    Questions

    1. For a scheduled run that needs a delegated answer, what is the recommended pattern on v1.0.5: a sync call that holds the turn open (bounded by the callee's execution_timeout_seconds), or an async call with a poll in the turn?
    2. If the wake is meant to continue a scheduled run: should a continuation of a schedule-backed turn run on that run's model, the way it already takes that turn's tier since PR fix(access): a platform continuation turn stands as the turn it continues (abilityai/trinity-enterprise#1225) #4546? And should the schedule's outcome wait for it?
  7. webmixgamer commented on Nov 23, 2026

    @webmixgamer
    Contributor

    Product ruling (2026-11-23) on question 1 in my comment above. For a scheduled run that needs a delegated answer, the supported pattern for now is to wait in the turn, with the per-call wake opt-out from #4538. This is an interim answer only. PR #4606 lands as planned.

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

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2status-in-progresstheme-reliabilitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions