Upstream contribution · max-sixty/worktrunk
worktrunk · Letting Worktrunk recover after a failed worktree lookup
Problem
Calling the plugin command before git init cached a null result for that directory. The same plugin process kept returning the miss after a worktree became available. A transient process failure could produce the same stale state.
Engineering response
The lookup now caches successful locations while retrying failures on subsequent commands. Positive caching still avoids unnecessary Git probes, and passive hooks continue to record directories without triggering lookups.
Evidence and scope
The PR reports a canonical Claude Code plugin test that starts without a repository, makes one available and verifies the subsequent pane opens. All nine canonical plugin tests passed on the reported candidate. The PR documents the tradeoff of repeat probes when every lookup fails.