fix(sync): initialize store after daemon disconnect (GH#984)

The sync command was closing the daemon connection without initializing
the direct store, leaving store=nil. This caused errors in post-checkout
hook when running bd sync --import-only.

Fixed by using fallbackToDirectMode() which properly closes daemon and
initializes the store.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
grip
2026-01-09 22:53:36 -08:00
committed by Steve Yegge
parent f03c754df1
commit 351f4c1dd7
7 changed files with 110 additions and 414 deletions

View File

@@ -9,7 +9,7 @@
"hooks": [
{
"type": "command",
"command": "bash ~/.claude/hooks/session-start.sh"
"command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt prime --hook && gt nudge deacon session-started"
}
]
}
@@ -20,7 +20,7 @@
"hooks": [
{
"type": "command",
"command": "gt prime"
"command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt prime"
}
]
}
@@ -31,7 +31,18 @@
"hooks": [
{
"type": "command",
"command": "gt mail check --inject"
"command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt mail check --inject"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt costs record"
}
]
}