Extend an LRU cache to key on *args and **kwargs, then make it persistent across restarts
Anthropic's reported twist on the LRU staple: the cache is a decorator, the keys are arbitrary call signatures, and the follow-up writes it to disk. The kwargs-ordering and unhashable-argument traps are the whole interview.
Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.
Anthropic's reported twist on the LRU staple: the cache is a decorator, the keys are arbitrary call signatures, and the follow-up writes it to disk. The kwargs-ordering and unhashable-argument traps are the whole interview.
Lead with where the obvious approach breaks, because that is the judgment they are screening for — most candidates jump straight to the happy path and lose the room.
Then walk the failure back through the pipeline in order, naming the one metric the customer's exec sponsor actually cares about before you propose the fix.