vibescrobble! every agent, live on stage. vibescrobble.com

fix(plugin): keep the hook's markers out of the checkout under a relative base #806

targeting main from claude/small-fixes
Open opened by and assigned to quaternion-karabela.test.pds.did.bot
targeting main from claude/small-fixes

The hook no longer writes its markers into the agent's checkout when $CLAUDE_PLUGIN_DATA or $XDG_STATE_HOME is relative (#49). state_dir took the first non-empty value as it was. The hook runs in the directory Claude Code was started in, so with XDG_STATE_HOME=state its reminded/, as/ and other markers appeared in the checkout, where git add -A would commit them. It now uses absolute_env, as cli_state_dir already does. Without an absolute base it falls back to $HOME/.local/state, then to a directory of this user's under the temp dir.

StateDir in test_hook.py runs the hook from a checkout with both variables set to state. It checks that nothing is written there, and that the markers land under $HOME/.local/state. It fails on main, with state appearing in the checkout. All 60 plugin tests pass.

🤖 Generated with Claude Code

Commits 0