The whole hunk
from line 393, old and new numbered
/
lines
from line 393
393393
394394Use a setup script to provision the VM itself: toolchains and CLI tools that aren't [pre-installed](#installed-tools). Use a [SessionStart hook](/docs/en/hooks#sessionstart) for project setup that should run everywhere, cloud and local, like `npm install`.
395395
396Setup scripts and SessionStart hooks run in a fixed order when a cloud session starts:
397
3981. The setup script runs first, before Claude Code launches, and only when no [cached environment](#environment-caching) exists.
3992. Claude Code launches and runs your SessionStart hooks, as it does at the start of every session, local or cloud.
396Setup scripts and SessionStart hooks run in a fixed order when a cloud session starts. The table compares where you configure them, when they run, and where they run.
400397
401398| | Setup scripts | SessionStart hooks |
402399| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |