# Prevent duplicate sends and sync worktree branch state · flambo/t3code

[View on GitCafe](https://git.cafe/flambo/t3code/commit/7b0ae4313956ab430fbcf196479cf598bfca39b0)

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

Visibility: public

Requested revision: 7b0ae4313956ab430fbcf196479cf598bfca39b0

Requested commit: 7b0ae4313956ab430fbcf196479cf598bfca39b0

Commit: 7b0ae4313956ab430fbcf196479cf598bfca39b0

Tree: f8569ae7cf014bd42df4df6340cdc4e5ff058487

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Prevent duplicate sends and sync worktree branch state

- Guard `onSend` with an in-flight ref to block double submits
- Set send phase before worktree prep and always clear in-flight state in `finally`
- Sync thread branch/worktree path immediately and await setup script execution

```

## Parents

- [69dbc5d0b02c6045dbbe4f2a58c7ae9bf62292eb](https://git.cafe/flambo/t3code/commit/69dbc5d0b02c6045dbbe4f2a58c7ae9bf62292eb?format=markdown)

[Source at this commit](https://git.cafe/flambo/t3code/tree/7b0ae4313956ab430fbcf196479cf598bfca39b0?format=markdown)
