connect
Connect the current coding agent installation to Altitude:
-
Identify which agent you are running in, then capture its version:
- Claude Code: run
claude --versionand take the leading semantic version number. - Codex: run
codex --versionand take the version from itscodex-cli x.y.zoutput. If it is older than 0.131.0, warn the user that Altitude's session hooks need Codex CLI >= 0.131.0 and suggest updating first — the server makes the final call during pairing.
- Claude Code: run
-
Start the pairing command for your agent in the background:
- Claude Code:
altitude connect --agent claude-code --agent-version <version> --next-hint "Open your coding agent in your project folder and run /altitude:begin to start your first lesson." - Codex:
altitude connect --agent codex --agent-version <version> --next-hint "Open your coding agent in your project folder and run $begin to start your first lesson."
Codex aside — the sandbox: in Codex's default modes the shell has no internet access, so a plain background
altitude connectfails before it can print a code. Request escalated permissions for that one command with a one-line justification ("Altitude needs network access to pair this computer with your account"). If that is declined, or the host has no such mechanism, do not retry blindly and do not call the install broken: give the learner the exactaltitude connectline above to run in their own terminal, ask them to paste back the URL and code it prints, and continue from step 3 with those. - Claude Code:
-
Relay the verification URL and one-time code from its output to the user immediately.
-
Wait for the user to confirm in the browser, then report whether the command completed successfully. If the learner ran the command in their own terminal, ask them to tell you when it reports success instead.
-
Run
altitude statusand summarize the connection, binding, and journey state. -
Codex aside — the one-time trust prompt: Codex asks "Hooks need review" the first time it launches with Altitude installed, and again after a plugin update changes a hook. Tell the learner to choose Trust all and continue whenever it appears; if they dismissed it earlier, ask them to open
/hooksnow and trust Altitude's hooks. Those hooks run outside the sandbox and keep a local copy of the journey fresh, which is what lets$beginand$next-lessonread it from inside the sandbox; untrusted, every lesson starts by asking them to run a command in their own terminal.
Do not alter the device flow or send credentials anywhere except through the altitude CLI.