fix(twitter): fail typed when a write command does not go through - #2256
Merged
jackwener merged 2 commits intoAug 22, 2026
Merged
Conversation
Benjamin-eecs
force-pushed
the
fix/twitter-write-exit-codes
branch
from
August 5, 2026 09:18
7fc4826 to
bd21761
Compare
Benjamin-eecs
marked this pull request as ready for review
August 5, 2026 09:33
Benjamin-eecs
force-pushed
the
fix/twitter-write-exit-codes
branch
from
August 5, 2026 09:45
bd21761 to
8bd80f3
Compare
Benjamin-eecs
force-pushed
the
fix/twitter-write-exit-codes
branch
5 times, most recently
from
August 11, 2026 13:58
a3f474d to
059be42
Compare
jackwener
force-pushed
the
fix/twitter-write-exit-codes
branch
from
August 22, 2026 18:52
059be42 to
3d7c7a6
Compare
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.
Problem
Closes #2255. Fifteen single-target Twitter write commands returned a
status: failedrow when a write did not happen, so the process still exited 0 and agents could not distinguish success from failure.A second safety boundary matters once these become errors: after a write click, failure to observe the expected UI state does not prove the server rejected the write. Treating that as a definite
CommandExecutionErrorinvites an automatic retry and duplicate likes, follows, blocks, retweets, or posts.Fix
The adapter now preserves the write phase:
CommandExecutionErrorbecause nothing changed.unconfirmedfrom the page script and throwTimeoutError(exit 75) with a “check before retrying” hint.This applies to post/reply/quote; like/unlike/bookmark/unbookmark; follow/unfollow/block/unblock; retweet/unretweet. Delete and hide-reply keep definite errors for their pre-write failure branches.
Regression coverage
In addition to command-level typed-error tests, three real JSDOM script executions pin the phase boundary across different UI families:
TimeoutErrorTimeoutErrorCommandExecutionError; confirm click with no observed blocked state →TimeoutErrorThe DOM helper executes the exact injected browser script with waits collapsed, rather than mocking its returned phase metadata.
Verification
Exact head
74088913:npm run typecheckpassednpm run buildpassed; manifest 1331 entriesgit diff --checkpassed