Skip to content

[Bug]: Waiting child run updates are filtered out before syncing parent task status #38107

Closed

Description

@fernandezbaptiste

Hullo folks,

I’m doing some research for Tessl Code Review and we ran it against your repo. It flagged a potential issue, and I figured it made sense to share it with you:

Before submitting

  • I searched existing issues and did not find an exact duplicate.
  • I included enough detail to investigate the problem.

Area

apps/server

Steps to reproduce

The parent task synchronization has a waiting mapping, but the run-update subscription appears to filter out the event that would invoke it.

A deterministic check of the current subscription predicate, using a normal command ID and a run.updated event with a delegatedTaskId, returns:

queued     accepted
starting   accepted
running    rejected
waiting    rejected
completed  accepted
failed     accepted

To exercise the application path: start an app-owned delegated task, let its child run move from running to waiting, and compare the child's run with the parent's subagent/node/turn-item projection before another eligible event occurs.

Expected behavior

The waiting transition reaches the existing synchronization logic and updates the parent task to waiting.

Actual behavior

The subscription admits delegated queued/starting updates and terminal updates, but drops waiting. handleRunUpdate therefore does not call finalizeAppOwnedSubagent(..., { syncRunId }) for that transition.

The nonterminal branch of finalizeAppOwnedSubagentTask explicitly maps a waiting child to a waiting parent record, but requires that matching syncRunId. Calls without it return before this update. On this path the parent can retain running while the child is waiting.

Impact

Minor bug: stale parent task status.

Version or commit

1379dd0bc6fd02191974afef60b5c4f42dec23bb

Environment and validation

Source inspection plus execution of the actual event-filter expression. This is not a full application/provider reproduction or an observed user session.

I checked the related completion/recovery reports, including #37090 and #17512. This report concerns a live nonterminal waiting transition, not a missed terminal result.


I’m with Tessl. Tessl reviews code using repository-level context and specific review lenses that improve over time through feedback. That’s how this finding surfaced. We’re just getting started and want to offer the tool free to open-source projects. If this is useful, happy to give you access.

Baptiste

Activity

  1. fernandezbaptiste commented on Nov 19, 2026

    @fernandezbaptiste
    Author

    Great to see the fix to the parent task’s waiting-state updates in #38112. Glad the report was useful, @juliusmarminge !

    As I mentioned, we’d be happy to provide this Code Review free for your open-source project. If you’d like to try it on upcoming PRs, create a Tessl account here, then send me your org name and I’ll arrange the account.

    Bap

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