Appearance
date: 2026-06-07 tags: [git, web-env, recovery, branches] status: active graduated_to:
"Lost" work in an ephemeral container — search commit content, not the branch name
Symptom — work "done involving be-radical" couldn't be found. git branch -a --list '*be-radical*' returned only the empty current session branch; the work appeared gone.
Root cause — Claude-Code-on-the-web session branches get auto-generated names (claude/<task-slug>-<id>) that reflect the session's framing, not the work done in it. The be-radical commits had been pushed to claude/harness-llm-security-review-AWLnd (a prior security-review session). A branch-name search will always miss this.
Fix — find by content across all refs, not by name:
git log --all -i --grep=<term>— match commit messages.git log --all -i -S<term>/-G<regex>— pickaxe the diffs (finds added/removed files like a new skill).- then
git branch -a --contains <sha>to locate which branch holds it, andgit merge-base --is-ancestor <sha> origin/mainto check if it ever reachedmain.
Recovered by range-cherry-picking merge-base..<branch> onto current main (the branch had diverged 9 commits behind, so a plain rebase would have replayed already-merged work).
Guard — convention, no test. When work seems missing in a fresh web container, search commit content across --all first; never conclude it's lost from a branch-name match alone. Nothing is durable until committed and pushed — the container is reclaimed on idle.