# fix\(mobile\): keep pending tasks queued when a send fails in flight · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/9d738dab392e70bad8083163f8214de4c14f2980)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 9d738dab392e70bad8083163f8214de4c14f2980

Requested commit: 9d738dab392e70bad8083163f8214de4c14f2980

Commit: 9d738dab392e70bad8083163f8214de4c14f2980

Tree: 84e28641523a79333035c21ecf59f2074e9fb593

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
fix(mobile): keep pending tasks queued when a send fails in flight

A pending task queued offline drains as soon as the phone reconnects, which
is exactly when the socket is most likely to drop again. The outbox drain
classified that failure by message text, and an RpcClientError wrapping a
SocketReadError reads "An error occurred during Read", which matched no
transport pattern. The drain treated it as a server rejection and restored
the task into the new-task draft, so it silently vanished from Pending.

Classify by error tag first: only OrchestrationDispatchCommandError and
EnvironmentAuthorizationError (the two errors dispatchCommand can return)
restore; RpcClientError, EnvironmentRpcUnavailableError,
EnvironmentNotRegisteredError and ConnectionTransientError retry. Untagged
errors still fall back to the message matcher.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

```

## Parents

- [9a47c7bd40522977c7df022a5b64759aae7b58e0](https://git.cafe/pingdotgg/t3code/commit/9a47c7bd40522977c7df022a5b64759aae7b58e0?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/9d738dab392e70bad8083163f8214de4c14f2980?format=markdown)
