Skip to content

Add SessionStart hook to provision Erlang/Elixir/SWI-Prolog in cloud sessions - #6

Merged
vbergeron merged 2 commits into
mainfrom
claude/prolog-elixir-testing-t3wqba
Aug 5, 2026
Merged

vbergeron merged 2 commits into
mainfrom
claude/prolog-elixir-testing-t3wqba

Conversation

@vbergeron

Copy link
Copy Markdown
Owner

Cloud sessions start from a bare Ubuntu VM with none of the toolchain mix.exs
and mise.toml expect, so mix test could not run there. The hook installs
Erlang and SWI-Prolog via apt (archive.ubuntu.com is on the default network
allowlist), unpacks a precompiled Elixir release from a GitHub release asset
(github.com is also allowlisted), and installs Hex + rebar3 by building them
from source via GitHub rather than mix's usual local.hex/local.rebar, which
hit builds.hex.pm — not allowlisted by default.

It then runs mix deps.get/compile so the project is ready when Claude starts
working. That step still needs repo.hex.pm reachable to fetch this project's
actual dependencies (req, jason, bandit, ...); if the environment's network
access doesn't include it, the hook logs what's missing and exits 0 rather
than failing the session.

No-op outside CLAUDE_CODE_REMOTE, so local dev (mise-managed toolchain per
README.md) is untouched.

claude added 2 commits August 5, 2026 18:37
…sessions

Cloud sessions start from a bare Ubuntu VM with none of the toolchain mix.exs
and mise.toml expect, so mix test could not run there. The hook installs
Erlang and SWI-Prolog via apt (archive.ubuntu.com is on the default network
allowlist), unpacks a precompiled Elixir release from a GitHub release asset
(github.com is also allowlisted), and installs Hex + rebar3 by building them
from source via GitHub rather than mix's usual local.hex/local.rebar, which
hit builds.hex.pm — not allowlisted by default.

It then runs mix deps.get/compile so the project is ready when Claude starts
working. That step still needs repo.hex.pm reachable to fetch this project's
actual dependencies (req, jason, bandit, ...); if the environment's network
access doesn't include it, the hook logs what's missing and exits 0 rather
than failing the session.

No-op outside CLAUDE_CODE_REMOTE, so local dev (mise-managed toolchain per
README.md) is untouched.
The session now starts immediately while the toolchain installs in the
background, instead of blocking on the ~1 minute install. Trade-off: a tool
call that runs before the hook finishes won't have elixir/mix/swipl on PATH
or the project's deps compiled yet.
@vbergeron
vbergeron merged commit 70064dc into main Aug 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants