Are you doing anything to prevent sending duplicates in the first place? (Like keeping track of what you’ve already tweeted?)
How frequently are you trying to tweet?
If you’re trying to send a tweet we detect as a duplicate, we’ll typically send you a HTTP 403, not a HTTP 401. Duplicate checks aren’t for the lifetime of the account but just a small selection of recent tweets.