[CodeTrain](https://codetrain.ai/) / [Docs](https://codetrain.ai/docs/) / Troubleshooting

# Troubleshooting

This page covers the problems people hit most with CodeTrain, on the website and in the CLI. Each entry says what the message means and the one thing to do next. The limits and refusals here are part of how CodeTrain works, not a fault on your side.

## Signing in

### The sign-in or invite email did not arrive

Mail from CodeTrain, sign-in mail carrying its verification code and team invites, can land in spam at first. Mark it "Not spam" and later mail should reach your inbox.

### The CLI login timed out

```
Timed out waiting for approval. Run codetrain login again.
```

`codetrain login` waits for the code to be confirmed in the browser for 10 minutes, then prints "Timed out waiting for approval. Run codetrain login again." Run `codetrain login` again and approve the code within that window. Approve only a code you started yourself.

### Not logged in

```
Not logged in. Run: codetrain login
```

This means no sign-in is saved on the machine. Run `codetrain login` to sign in. Once signed in, `codetrain status` shows your plan and usage.

## Limits

### The monthly lesson count ran out

Lessons are counted by the calendar month on every plan, and the count starts again on the 1st of the month, UTC. When the month's allowance is used, the message names the date it resets. On the Free plan the allowance is 10 lessons a month.

### The daily limit was reached

There is also a daily limit on tutor use. It resets at the start of the next day, UTC, and the message names the date. Start a lesson again then.

### Too many requests

Too many requests arrived at once. The message says how many seconds to wait before trying again.

### A lesson reached its limit

One lesson has a ceiling on tutor turns. When a lesson reaches it, your work is saved. Start a new lesson and carry on.

## Running code

### Code did not run on CodeTrain's servers

Python and JavaScript run in the browser. Code a browser cannot run, such as bash, runs on CodeTrain's servers, and those runs are counted per account over a rolling 24 hours, freeing up again as the hours pass. If the code runner is switched off or does not answer, trying again in a moment usually works, and sending the code still gets a review without a run.

### Python does not run in the browser

Python in the browser runs on Pyodide, which the page downloads from `cdn.jsdelivr.net` the first time Python runs. A proxy or browser extension that blocks that domain stops Python steps from running in the browser. Let `cdn.jsdelivr.net` through and the steps run.

## The CodeTrain CLI

### The lesson page did not open

```
Tutor UI failed to start. See the workspace's .tutor/serve.log.
```

If the CLI's lesson page cannot start, the CLI prints "Tutor UI failed to start. See the workspace's .tutor/serve.log." That log file is inside the lesson's workspace folder. If port 7341 is busy, the CLI moves to the next free port by itself.

### The local tutor server stopped

```
The local tutor server stopped unexpectedly
```

The CLI prints this when the local lesson page's server stops during a lesson. Run `codetrain start` and it reconnects to the lesson in progress, picking up where you left off.

### A mode is refused

A mode the plan does not include is refused when the lesson starts, with "Can't start a ... session:" followed by the reason. The [/docs/cli/](https://codetrain.ai/docs/cli/) page lists which plan allows which mode.

### Bash steps are not run

```
Note: no local Docker or Podman detected
```

Bash and shell steps in the CLI run in a container on your machine, which needs Docker or Podman. With neither installed, the CLI prints a note at the start and those steps are reviewed as written commands only, without running. Install Docker or Podman for the full hands-on lesson.

### Repo mode cannot see a file

In repo mode the CLI does not read files on the secret denylist (such as `.env`, `.env.*`, private keys and credential files; the full list is on [the security page](https://codetrain.ai/security#secrets-are-refused-before-they-are-read)), files git ignores, the `.git` folder, or vendor or dependency folders. Template files such as `.env.example` are read, since they hold no live values. This is deliberate and cannot be switched off.

## Teams

### No AI usage is open for you on a team

On a team, no AI usage may be open for you yet. The team's owner, who buys usage, or an admin, who can add a team key or mark learners, can open it. If you are not marked as one of the team's learners, an owner or admin can mark you, and when the team runs on its own key with none assigned to you, a team admin can assign one. The CLI still works with your own key.

## The tutor

### The tutor will not write the answer

The tutor does not write the code for the step you are on. You write every line; it sets the step, gives hints and reviews your work. This is the method, not a fault. When a hint or feedback would show the step's code, the lesson page holds that part behind a closed "Show it anyway" section. The [/learn/socratic-method/](https://codetrain.ai/learn/socratic-method/) page explains the method.

---

Source: https://codetrain.ai/docs/troubleshooting/

This is the markdown twin of the page above. Every public CodeTrain page serves one on `Accept: text/markdown`. Start at https://codetrain.ai/llms.txt for the full map, or https://codetrain.ai/developers/ for the API.
