Skip to content

fix(agents): set no deadline on an agent's work - #874

Open
baxen wants to merge 1 commit into
baxen/agents-renamefrom
baxen/agent-no-time-limit
Open

baxen wants to merge 1 commit into
baxen/agents-renamefrom
baxen/agent-no-time-limit

Conversation

@baxen

@baxen baxen commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Top of the agents merge stack: #838 → #855 → #856 → #858 → #859 → #860 → #865 → #867 → #871 → this PR.

Buzz shouldn't put its own time limit on an agent's work. The harness can have one built in, but Buzz adds nothing on top. Before this PR, Buzz had two:

  • Codex: every turn was aborted after 29 minutes (AbortSignal.timeout(29 * 60_000) in the Codex runtime). A long turn failed with "Codex could not finish: The operation timed out." even while it was still working. That's what cut codex00 off mid-push tonight.
  • Both harnesses: the Agents service stopped counting handed-off work as working after 30 minutes. A longer Claude Code or Codex turn lost its 👀/💬 reactions and local typing while it was still running.

Changes

  • The Codex turn signal now aborts only when the agent stops or the turn ends.
  • working() in the Agents service has no timer. Work counts as working until everything handed to workingUntil settles.

Not changed

  • Claude Code had no turn limit. Its 15-minute idle stop only ends conversations that aren't busy.
  • The agent type timeoutMs deadline on run is unchanged. Both harnesses return from run as soon as the turn is handed over, so it only covers that handover.
  • Codex's 30-second RPC timeout is unchanged. It applies to each protocol request, such as thread/start, not to the turn.
  • Removing an agent still stops its work. For Codex, the entry abort interrupts the turn. For Claude Code, the process is killed and its pending turn settles.

Testing

  • New tests: a Codex turn with every AbortSignal.timeout already expired still completes, and a mention's reactions survive two hours of handed-off work. Both fail without the fix.
  • Full vitest run passes: 580 files, 8247 tests. tsc and biome are clean.

🤖 Generated with Claude Code

Buzz cut every Codex turn off after 29 minutes and stopped counting any
handed-off run as working after 30, whether or not the agent was still
going. A long Codex turn failed with "Codex could not finish: The
operation timed out." Both limits are gone: a turn runs until the
harness ends it, and the 👀/💬 reactions and local typing last as long
as the work does. Removing an agent still stops its work.

Co-authored-by: claude00 <fb8b76a01257932b8ca35060862c29bd09b2137638573731c2d5074fc02c5385@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
@baxen
baxen requested a review from a team as a code owner October 12, 2026 01:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T01:10:11.207093Z 7e0ffeb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e0ffeb673

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +605 to +606
// No deadline of our own: a turn runs until Codex ends it.
const signal = AbortSignal.any([entry.abort.signal, turnAbort.signal]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Sign off the commit before landing

Commit 21968c640956341347d8a370fc444051e3873bd0 has no Signed-off-by trailer in its raw commit message, so the repository's hosted DCO Check will fail even if the code checks pass. Recreate this commit with git commit --signoff before landing.

AGENTS.md reference: AGENTS.md:L194-L198

Useful? React with 👍 / 👎.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes requested. The two removed timers no longer cut off ongoing work; explicit agent-stop cancellation, turn completion/error cleanup, and handed-off-work settlement remain in place.

Star Lord automated source review via Wes’s account; head 7e0ffeb6730396dfc357547eb3c8f5526fc3146f, base 6eacd1336a798fa991b0937866bedaac2573fe3f. Source-only: inspected the implementation and regression tests; tests, app execution, and long-running native behavior were not validated.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants