Commit 28c0e94
build(bootstrap): make the SessionStart prover hook synchronous (#324)
## Summary
Flip `.claude/hooks/session-start.sh` from **async** to **synchronous**,
as requested. The session now blocks until Coq/Idris2/Zig are
provisioned, so the first prompt is **guaranteed** a working prover
instead of racing the background install.
## Why this is the right trade-off (not just a slower start)
The ~10–15 min Idris2 source build is paid **once on a cold container**.
Claude Code on the web **caches the container after the SessionStart
hook completes**, so every subsequent session hits the installers'
idempotent early-exits and starts fast — with the prover guarantee
intact each time. And because the installers are fail-soft + idempotent,
a cold build truncated by any hook timeout simply resumes on the next
session until the container is cached. Net: pay once, fast + guaranteed
thereafter.
## Change
- Removed the async opt-in (`{"async": true, ...}`) so the hook runs
synchronously.
- The verbose Idris2 build is redirected to
`$TMPDIR/ephapax-bootstrap.log`; only a one-line-per-prover summary
reaches the session transcript (no build spam).
- A header comment documents how to revert to async if the cold-start
wait is ever unwelcome.
Only `.claude/hooks/session-start.sh` changes; the installer scripts,
devcontainer, `.tool-versions`, and `just bootstrap` are untouched.
## Validated in-session
- Emits **no** async JSON (true sync mode).
- Runs `bootstrap-provers.sh` to completion and prints the
Coq/Idris2/Zig summary.
- **No-ops silently** when `CLAUDE_CODE_REMOTE` is unset (devcontainers
use postCreate instead).
- This environment confirms `CLAUDE_CODE_REMOTE=true`, so the remote
path is the one that fires.
## Hook execution mode
**Synchronous.** Pro: provers guaranteed before the first prompt (no
race). Con: first cold session waits for the build; amortized to ~0 by
container caching thereafter.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01AGFqWzByua4dKbA7W7oVsL
---
_Generated by [Claude
Code](https://claude.ai/code/session_01AGFqWzByua4dKbA7W7oVsL)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 04d3c3e commit 28c0e94
1 file changed
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | | - | |
28 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments