Fix Claude Code cache bugs with patches and tests for resume cache regressions and sentinel replacement, while keeping stock claude untouched