Skip to content

[build-tools] Stop Argent startup when the session is stopped - #4667

Open
gwdp wants to merge 1 commit into
gwdp/agent-device-startup-stop-20261016from
gwdp/argent-startup-stop-20261016
Open

gwdp wants to merge 1 commit into
gwdp/agent-device-startup-stop-20261016from
gwdp/argent-startup-stop-20261016

Conversation

@gwdp

@gwdp gwdp commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Why

A Stop request that arrives while an Argent session is still starting does not end startup. The worker goes on through Simulator preparation, the Argent setup commands and the tool-server start, and then reports the session as ready. #4666 fixes this for agent-device. This PR does the same for Argent.

How

  • Use the shared startup Stop watch from [build-tools] Stop agent-device startup when the session is stopped #4666 (watchDeviceRunSessionStartup), with a createStartupTasks startup signal, like agent-device.
  • Pass the startup signal to Simulator preparation, the host start, every Argent setup command, the tool-server state wait and the ready report. On Stop, the pending work is cancelled, and the step ends without a ready report.
  • The prepared-iOS setup commands are now cancellable on all platforms, not only when this step boots the Simulator.
  • End the watch after the ready report and before the lifetime wait, so only one status poll runs at a time.
  • A Stop during startup ends the step without an error. Any other failure keeps its first error, and teardown errors stay visible.
  • Artifact polling is unchanged.

Test Plan

  • New controller tests: Stop during setup on macOS and Linux, a teardown failure after Stop that stays visible, and cancellable prepared setup commands.
  • Claude Code ran the build-tools typecheck and the src/steps tests on this commit (1946 passed, 8 skipped), and the root build, typecheck, oxlint, oxfmt and Lerna tests on the top of the stack (2511 passed, 8 skipped).
  • CI passes on 9a8519f. Codecov reports all changed lines covered.
  • Planned: a hosted check that Stop during Argent startup ends the session without a ready report.

Authorship and LLM use

Gabe asked for Stop coverage for every Simulator session type, with one PR per type. Codex wrote the first version, which added the startup watch in this PR, and Devin found no issues in that version. Claude Code rebased it onto the current #4666. On Gabe's request, Claude Code moved the watch into #4666 and gave the three session types the same startup code. Gabe reviewed the final diffs and can answer questions.

Generated with T3 Code, using Claude Code.

@gwdp

This comment has been minimized.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

devin-ai-integration[bot]

This comment was marked as outdated.

@gwdp
gwdp removed this pull request from stack #4606 October 17, 2026 01:44
@gwdp
gwdp added this pull request to stack #4670 October 17, 2026 01:44
@gwdp gwdp changed the title [build-tools] Observe Argent Stop requests during startup [build-tools] Stop Argent startup when the session is stopped Oct 20, 2026
@gwdp
gwdp force-pushed the gwdp/argent-startup-stop-20261016 branch from c99d35f to 8239a5c Compare October 20, 2026 19:04
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.39%. Comparing base (bf60bca) to head (9a8519f).

Additional details and impacted files
@@                             Coverage Diff                             @@
##           gwdp/agent-device-startup-stop-20261016    #4667      +/-   ##
===========================================================================
+ Coverage                                    75.38%   75.39%   +0.01%     
===========================================================================
  Files                                         1055     1056       +1     
  Lines                                        52359    52370      +11     
  Branches                                     11390    11387       -3     
===========================================================================
+ Hits                                         39466    39477      +11     
  Misses                                       11904    11904              
  Partials                                       989      989              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gwdp
gwdp force-pushed the gwdp/argent-startup-stop-20261016 branch from 8239a5c to 9a8519f Compare October 20, 2026 20:16
@gwdp
gwdp marked this pull request as ready for review October 20, 2026 20:46
@gwdp
gwdp requested a review from szdziedzic October 20, 2026 20:46
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

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.

1 participant