Conversation
vonovak
added this pull request to stack #4421
September 17, 2026 15:18
vonovak
marked this pull request as ready for review
September 17, 2026 15:18
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## codex/session-host-finish-policy #4431 +/- ##
====================================================================
+ Coverage 72.42% 72.42% +0.01%
====================================================================
Files 973 973
Lines 46363 46369 +6
Branches 9956 9953 -3
====================================================================
+ Hits 33574 33580 +6
Misses 11794 11794
Partials 995 995 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vonovak
removed this pull request from stack #4421
September 17, 2026 16:06
vonovak
added this pull request to stack #4432
September 17, 2026 16:06
This was referenced Sep 17, 2026
vonovak
force-pushed
the
codex/session-teardown-helper
branch
from
September 17, 2026 18:28
ae105b4 to
a8d05dd
Compare
vonovak
force-pushed
the
codex/session-teardown-helper
branch
from
September 18, 2026 08:09
a8d05dd to
321cc63
Compare
vonovak
force-pushed
the
codex/session-teardown-helper
branch
from
September 18, 2026 10:03
321cc63 to
167cd84
Compare
The error that ended the session must reach the step, not the teardown error. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D29AEWN9ajZXbzobHUH4fF
The Agent Device, Appium and Argent steps each ran Promise.allSettled over their teardown and rethrew the first rejection from a finally block, which replaced the error that had ended the session. One helper now runs every teardown, logs each failure, and rethrows only when the session body succeeded. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D29AEWN9ajZXbzobHUH4fF
Its module mock listed every export by hand, so the new helper was undefined and a teardown rejection escaped as an unhandled error. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D29AEWN9ajZXbzobHUH4fF
vonovak
force-pushed
the
codex/session-teardown-helper
branch
from
September 18, 2026 10:19
167cd84 to
13aa75c
Compare
A rejected event collection stop no longer leaves the automation process running. The tunnel close, the collector-then-process pair and the host finish are separate teardown entries; the process stop sits in a finally. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D29AEWN9ajZXbzobHUH4fF
vonovak
force-pushed
the
codex/session-teardown-helper
branch
from
September 18, 2026 11:17
28a9cd5 to
e780c40
Compare
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Agent Device, Appium and Argent steps each had their own teardown. When teardown failed, its error replaced the error that had ended the session, in all three steps.
How
finishRemoteSessionAsyncruns every teardown, logs each failure, and rethrows the first one only when the session itself succeeded. All three steps use it.Each step hands it independent entries: the tunnel close, the collector stop with the process stop in a
finally, and the host finish. Before, one entry ran them in sequence, so a rejected Appium collector stop left the Appium process running.Stack 4/6, based on #4430, followed by #4435 → #4441.
Test plan
The orchestration tests fail teardown while the session body fails at each phase and assert the body error reaches the caller. Each case failed before this change. A new case rejects the collector stop and asserts the process stop and host finish still run; it failed for Appium before the change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01D29AEWN9ajZXbzobHUH4fF