On a generation starship, hard choices have to be made. The AI belonging to one of the ship’s families, who rely on it for not only daily issues, but recording their long history, is damaged. In trying to fix the hardware fault, the current family member who is the AI ‘wrangler’ finds that her predecessor in the role has in fact hacked the AI. The reason : to protect himself from the dementia he realises that he is developing, before anyone else spots it. Why? Because on the ship there isn’t the option to keep crewmembers who aren’t contributing to the mission.
There’s a clever playoff between the AI who has lost its long term memory, and the now severely demented elder. The latter has no choice as to his future, but the AI has to make a choice as to its future.