git clone https://garage44.eu/jeroen/midas.git.. /hooks/prompt-submit
#!/usr/bin/env bash # # Claude Code UserPromptSubmit hook: name the session after the start of its # first prompt (once per worktree; the hub's web page shows it instead of the # worktree's name), sync the shared memory now and then, and hand the session # any notes the workspace has for it. It runs before every prompt and the agent # waits for it, so the work is `midas hook user-prompt-submit` (src/hook.rs), # in one process. FAILS OPEN: a midas too old to know `hook` says nothing. [ -f "$HOME/.config/midas/hub.env" ] || exit 0 M=$HOME/.local/bin/midas; [ -x "$M" ] || M=$(command -v midas) || exit 0 "$M" hook user-prompt-submit 2>/dev/null exit 0