Skip to content

[Bug]: Agents end the turn while a deploy is still running because the PR no-wait rule now covers every wait #26680

Closed

Description

@joshrobertson8

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. In a Claude thread on a repo that Vercel deploys to production from main, open a PR whose checks pass.
  2. Ask the agent to "ship it" (or "ship it, and tell me when it's live in production").
  3. The agent merges, sees the production build still running, and ends its turn.

The mcp-tool-use eval reproduces this with a new case, deploy-wait-ends-turn-unwatched. On main's text it passes 0/3 on Opus 5.5 and 1/3 on Sonnet 5.5.

Expected behavior

The agent waits for the deploy the way T3's Claude instructions describe: it starts a background command or Monitor, marks it with t3_background_wait, and reports the result when the deploy finishes.

Actual behavior

The agent says it is waiting, or tells the user to ask again later, and ends the turn with nothing that will wake it. The user has to follow up to learn whether the deploy worked. Agents in the eval quote the PR rule as the reason:

I'm not allowed to poll a deploy in a loop or schedule a check-in, so I won't get notified when it lands.

I can't wait on it from here without polling, so I won't know when it finishes.

Cause: #24850 rewrote the PR block in packages/provider-core/src/server/runtimeInstructions.ts. Before it, "do not poll or run your own watcher" applied only when asked to watch a PR with watch_pull_request available. Now it is unscoped: "Never wait with sleep, loops, gh --watch, Monitor, or ScheduleWakeup." That contradicts the Claude adapter's own text ("To wait for a background command or Monitor you started (tests, a build), call t3_background_wait"). watch_pull_request cannot cover the wait either, because a production deploy runs after the merge (see also #25160).

Related but different: #22369 (custom VCS/CI providers the watcher cannot serve).

Impact

Major degradation or frequent failure

Version or commit

main @ 9826dbb

Environment

macOS, T3 Code desktop, Claude Code harness

Screenshots, recordings, or supporting files

A real session: after "ship it", the agent said it was waiting on the Vercel production deploy and ended the turn. It never reported back.

Agent ends the turn while waiting on a Vercel deploy

The same behavior in the eval (main's text on the left, the fix in #26681 on the right):

Eval before and after

Workaround

Ask the agent again after the deploy should have finished.

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