Add Claude Code on the web SessionStart hook (Rust + Elixir)#155
Merged
Conversation
Cloud sessions ship cargo but not Erlang/Elixir, which the elixir-orchestration layer needs. Adds a cloud-only SessionStart hook that: - installs Erlang (apt, OTP 25) + Elixir 1.17 (GitHub precompiled, satisfies elixir-orchestration's `elixir: "~> 1.17"`), idempotently; - warms the Rust workspace with `cargo fetch` (the ~20-crate build compiles on first use — too heavy to run synchronously every session); - best-effort `mix deps.get` for the Elixir deps. Every step is best-effort and cloud-only (CLAUDE_CODE_REMOTE) so it never aborts session startup. Network note: `mix deps.get` needs Hex registry access (repo.hex.pm / builds.hex.pm); on a restrictive "Trusted" allowlist those are blocked (403) and skipped cleanly, on "Full" access they complete. cargo works on Trusted (crates.io is allowlisted). REUSE.toml: cover .claude/** under MPL-2.0 (settings.json carries no inline SPDX header; the hook script has one). Validated in a cloud session: hook exits 0, installs Erlang+Elixir (mix 1.17.3) and runs cargo fetch; local-skip is a no-op; the Hex-blocked mix step degrades gracefully. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nyxs8RgqZa72PzrTu3L75
hyperpolymath
marked this pull request as ready for review
June 21, 2026 14:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a cloud-only
SessionStarthook so Claude Code on the web sessions start with VeriSimDB's toolchain ready. Cloud images shipcargobut not Erlang/Elixir (whichelixir-orchestrationneeds), so the hook installs them and warms the workspace.Changes (
.claude/).claude/hooks/session-start.sh— cloud-only (CLAUDE_CODE_REMOTE), idempotent, best-effort:elixir-orchestration'selixir: "~> 1.17".cargo fetch(the ~20-crate workspace compiles on first use — too heavy to build synchronously every session).mix deps.getfor the Elixir deps.Plus
.claude/settings.json(registers the hook onstartup|resume) and aREUSE.tomlannotation covering.claude/**.Scope notes
CLAUDE.mdstill lists ReScript as allowed — worth reconciling.)Network caveat (important)
mix deps.getneeds the Hex registry (repo.hex.pm/builds.hex.pm). On a restrictive Trusted network allowlist those are blocked (HTTP 403) and skipped cleanly; on Full network access they complete.cargoworks on Trusted (crates.io is allowlisted). For faster startup, the install step is a good candidate to move to a cached Setup Script (environment config).Validation (in a cloud session)
mix 1.17.3) and runscargo fetchCLAUDE_CODE_REMOTEis unsetmix deps.get403s on this session's Trusted network (degrades gracefully, as designed) — validates fully only on Full networkNote
Synchronous hook: it guarantees the toolchain is ready before the session starts, at the cost of install time on first run. Can switch to async, or move installs to a cached Setup Script, if preferred.
🤖 Generated with Claude Code
https://claude.ai/code/session_017nyxs8RgqZa72PzrTu3L75
Generated by Claude Code