Skip to content

Automatically resume agent thread on CI/check failure #10717

Description

@benjaco

Problem

T3 Code can already work with GitHub/PR state, but CI handling still appears to rely on the agent actively polling/checking status.

For long-running coding tasks, it would be much more useful if T3 Code itself could monitor the PR/check state and push failures back into the existing agent thread when they happen.

This is especially important for projects where CI runs tests that cannot realistically be reproduced in the local development environment, for example:

  • architecture-specific builds/tests (ARM64, different CPU features, etc.)
  • OS-specific jobs (Linux/macOS/Windows)
  • containerized or service-heavy integration environments
  • tests that depend on infrastructure, secrets, external services, or hosted runners
  • larger CI matrices that would be impractical to run locally

In those cases, CI is not just a final verification step; it is effectively part of the development feedback loop. The agent needs the failure output in order to continue the task.

Proposed behavior

When a thread is associated with a branch/PR:

  1. After the agent pushes a commit, monitor the checks for that PR/HEAD SHA.
  2. If a check fails, fetch the failed check metadata and relevant logs/output.
  3. Inject the failure into the existing thread as new context/event.
  4. Automatically resume/wake the agent so it can diagnose and fix the failure.
  5. After the agent pushes a new commit, ignore failures/results belonging to obsolete SHAs.
  6. Continue until the latest commit is green, or until the agent/user stops the workflow.

Why

This would avoid spending agent turns repeatedly polling GitHub and would make the workflow genuinely event-driven:

push -> CI runs -> failure arrives -> existing agent thread resumes -> fix -> push -> CI reruns

The important distinction is that T3 Code should be the event source here rather than requiring the agent to periodically ask GitHub whether CI has completed.

It would also make external signals such as CI failures behave more like first-class inputs to a running agent session, which seems useful beyond GitHub Actions as well.

Activity

  1. juliusmarminge commented on Sep 8, 2026

    @juliusmarminge
    Member

    Triage

    This is a real product gap, not a bug in current behavior.

    T3 Code already links a thread to a branch/PR (ThreadPullRequestReactor) and can show check rollups in the PR UI. It does not subscribe to check state, fetch failure logs, inject that into the thread, or start a new turn when CI fails. The sidebar Monitoring pill is provider watch-loop liveness (the agent polling gh, tailing logs, or using a monitor tool). That is the opposite of what this issue asks for: T3 as the event source.

    Closest prior work

    No open or merged PR implements this.

    Suggested direction

    Treat this as an accepted enhancement. A first cut should look like #4428, not automatic resume on every push of every linked thread:

    1. Opt-in babysit (agent or user starts watching a linked PR).
    2. Server watches HEAD SHA checks (poll or host CLI; no new webhook service).
    3. On failure, fetch metadata + bounded logs and dispatch thread.turn.start on the existing thread.
    4. Drop results for superseded SHAs; stop on user settle/stop, circuit breaker, or green HEAD.

    Automatic-on-every-push is a later product call (cost, surprise wakes, stopped/snoozed threads). GitLab / Bitbucket / Azure DevOps already expose check rollups and would each need an explicit “supported / not here” decision.

    Labels: enhancement, accepted, via-triage (remove needs-triage).

  2. added
    via-triageFiled through npx t3 triage
    enhancementRequested improvement or new capability.
    acceptedfeature request accepted
    on Sep 8, 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

    acceptedfeature request acceptedenhancementRequested improvement or new capability.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions