TA Guide: Helping with Setup

This page is for teaching assistants. It covers the same steps as the participant’s Get Started page, in the order to do them when you’re helping someone from scratch: the API key goes into GitHub before the codespace is created. For each step it lists what to check on the participant’s screen and what usually goes wrong.

Let the participant drive their own keyboard where you can. They will repeat some of these steps (opening the codespace, /key, /usage) on their own later in the week.

Find out where they are

Ask which step they reached, then jump to it:

They say… Go to
“I can’t see the Use this template button” GitHub account
“I don’t have a repository” or “I’m not sure which repo is mine” Their own repository
“/claim doesn’t work” or “I didn’t get a key” Discord and the API key
“The codespace is still loading” or “R doesn’t work” Launch the codespace
“VS Code won’t open the codespace” Connect, then the browser fallback
“Pi says there’s no API key” The secret, then restart and test

1. GitHub account

TipIf the green buttons are missing

GitHub hides “Use this template” and “Code” from visitors who aren’t signed in. Missing buttons almost always mean the participant is signed out.

If GitHub refuses to create a repository or a codespace on a brand-new account, check that the account’s email address is verified (GitHub’s settings page shows a banner when it isn’t).

2. Their own repository

WarningCommon mistake: Open in a codespace

The “Use this template” dropdown also offers “Open in a codespace”. That launches a codespace with no repository of their own behind it, so they can’t save work to GitHub and can’t give the API key access to it. If they did this, delete that codespace at github.com/codespaces and start again with “Create a new repository”.

Forks don’t work either. If they see “forked from” under the repository name, have them create a fresh repository from the template.

3. Discord and the API key

Before they type anything:

ImportantRole first, then /claim

The bot only gives keys to people with the Participant role. Without the role, /claim does nothing: no reply, no error. If a participant says “nothing happened”, check the role, assign it, and have them run /claim again.

Then they type /claim:

If they dismissed the reply or lost the key, /key shows it again. /usage shows how much of today’s budget they’ve spent; it resets at midnight UTC.

CautionKeys are personal

If a participant pastes their key into a public channel, ask them to delete the message and tell Joseph so the key can be replaced. Don’t photograph or copy anyone’s key yourself.

4. Add the secret to GitHub

To fix a typo in the value or the repository access, click Update next to the secret. To fix a typo in the name, delete the secret and add a new one.

5. Launch the codespace

ImportantSecret saved? Then launch

A codespace reads its secrets only when it starts, so check that step 4 is done before creating the codespace. If they already have a codespace from before the secret existed (for example, built on Monday), don’t create another one: skip to step 8 and restart it.

Check that R works: Terminal → New Terminal, type R, then library(tidyverse). A list of attached packages and no line starting with Error means the build is good. q("no") leaves R.

WarningIf the build failed

A message about recovery mode, or R: command not found in the terminal, means the container didn’t build. Open the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on a Mac) and run “Codespaces: Full Rebuild Container”. If that fails too, delete the codespace and create a new one, and tell Joseph.

6. Connect from VS Code on their laptop

The codespace opens in a browser tab by default. We’d like participants to use the VS Code desktop app, which handles keyboard shortcuts and copy-paste better than the browser.

To connect:

  1. In VS Code, click the icon in the bottom-left corner of the window (two small arrows).
  2. Choose “Connect to Codespace”.
  3. The first time, VS Code asks them to sign in to GitHub and authorize VS Code. This opens a browser page; they approve it there and return to VS Code.
  4. Their codespace appears in the list. Click it.
WarningConnect, never Create

The same menu offers “Create New Codespace”. Tell the participant to choose “Connect to Codespace” every time, today and every morning after. Someone who picks Create gets a fresh, empty codespace, and their work ends up split across several codespaces.

If a participant already has more than one, open github.com/codespaces and work out which one holds their work (usually the oldest). Before deleting any extra codespace, open it and check the Source Control panel: if it lists changed files, they commit and push them first. Deleting a codespace deletes anything in it that wasn’t pushed to GitHub.

7. Fall back to the browser

If the desktop app won’t connect after a couple of tries, don’t spend the session on it. VS Code in the browser is the same editor, and everything in the workshop works there.

Some shortcuts belong to the browser instead of VS Code (Ctrl+W closes the browser tab, for example). The Terminal, View and other menus are in the ☰ menu at the top left.

If clicking the codespace’s name tries to launch the desktop app when they wanted the browser, their default is set to VS Code. They can change it under Editor preference on the Codespaces settings page.

8. Restart and test

If the codespace was created after the secret was saved (the order on this page), skip the first two checks and go straight to the test.

  • echo ${OPENROUTER_API_KEY:0:9}

    It should print sk-or-v1- and nothing else of the key. A blank line means the codespace can’t see the secret: go back to step 4, check the name and the repository access, then restart again.

If Pi starts but every request fails with an error about credit or budget, have them run /usage in Discord. If they haven’t spent anything and it still fails, tell Joseph.

When to hand off

Pass it to Joseph or another instructor when:

  • the container fails to build twice,
  • the bot won’t give a key to someone who has the Participant role,
  • a key has been posted publicly,
  • you have spent 15 minutes on one participant and the browser fallback hasn’t helped.