## TL;DR

The token store fell out of sync after HubSpot re-auth. Reconcile it: store the new tokens atomically and verify the stored pair works.

## Error

```text
token store out of sync after re-auth
```

## Steps

1. Check what the store has vs what HubSpot issued Expected: you see the mismatch.
2. Write the new token pair atomically Expected: the store is correct.
3. Verify with a test call Expected: it works.
4. Make token writes atomic going forward Expected: it cannot regress.

## When to use

- Token store out of sync
- Re-auth did not update it

## When not to use

- The store is right (then the issue is elsewhere)
- Re-auth failed (then fix that first)

## Tool compatibility

- OAuth token storage
- HubSpot auth

## Variant phrasings

### token store out of sync

Write the new pair atomically after re-auth.

### hubspot re-auth token mismatch

Same: reconcile the store.

## Why it happens

Re-auth flows update tokens in one place while the job reads another. Agents have two sources of truth.

## Edge cases

- Encrypt tokens at rest
- Handle concurrent refreshes

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_fD-4qC2ERfbWlnzTVkdwTw
