Codeshares are cancelled automatically, for example when AA has it's very frequent Sunday shuffles for flights more than 2 months away. One will often get the same day or next day email informing the passenger of this. If AA does this on one Sunday, there is often a tidy up round the following Sunday when they realise that some expensive ticketing arrangements are in jeopardy. I had a few changes on last Sunday 15 September.
Codeshares are built manually. So when the above has happened, it can take several days - or even a week or two - for the codeshares to be reinserted into the schedule. Then there is the tidy-up Sunday to bear in mind. Consequently my usual advice is that once this has happened, and assuming it's not for something like the Thanksgiving or Christmas weekends, then just leave it 2 or 3 weeks. By that stage the manual codeshares should be back and the trip will become more viable. But reacting immediately isn't necessarily the best idea.