Skip to content

Sessions

Fixes for Sessions, Sandboxes and Environments. A Session that can’t start doesn’t retry by itself: it goes Asleep with the reason in its transcript, and its prompts wait. Fix the cause, then send a prompt or press Wake now.

What you see. A new or woken Session shows This Session is Asleep, and its transcript says:

The Session is Asleep: Claude Code could not start on build-box: …

Why. The Runner’s reason follows the colon:

Reason starts withWhat failed
git clone exited with …The Runner couldn’t clone the Repo. See git clone exited with 128.
The bootstrap script exited with …The Environment’s Bootstrap script, as the Runner built the image.
Installing Docker exited with …Installing Docker, for an Environment with Docker on.
Installing tmux and bash exited with …The image lacks tmux 3.2 or bash, and has no package manager kndl knows. Install them in the Bootstrap script, or use an image that has them.
The start script exited with …The Environment’s Start script, in the Sandbox.
Reading the login shell's environment failed: …A shell profile in the image, such as ~/.bashrc.
The Sandbox failed: …The microVM. See The Sandbox failed.

Fix. Press Wake now, and open Show log on the Starting… banner for the full output. Fix the script in the Repo’s Environment, run a Test build, and apply it. See Set up an Environment.

What you see. A Session shows This Session is Asleep with:

Claude Code exited with code 1. Its Sandbox is stopped. …

Why. Claude Code ended by itself: it crashed, refused to start, or was quit from its terminal. Code 0 means it quit normally, as after /exit.

Fix. Open Show Claude Code’s last output under the message, fix what it names, and press Wake now. A sign-in or usage message means the Claude credential the Session runs on needs attention: its Creator replaces theirs on their Account page.

A woken Session’s conversation starts over

Section titled “A woken Session’s conversation starts over”

What you see. A woken Session’s history says Claude Code, or pi, couldn’t resume its conversation.

Why. The agent exited before it saved the conversation, so there was nothing to resume.

Fix. Nothing. The Workspace is as it was; only the conversation starts over.

What you see. A Session shows This Session can’t start, or New Session refuses, with:

kddige/kndl's Sessions can't start: NPM_TOKEN and GH_TOKEN (the shared variable GITHUB_TOKEN) need values. Enter them on the Repo's Environment screen and the Shared variables screen.

Why. The Hub’s secrets key was lost and its Sensitive values cleared. The variables are kept without values.

Fix. Press Enter values, type each value on the Repo’s Environment and apply, and press Enter value on each Shared variable it names. Then wake the Session.

What you see. The transcript says:

The Session is Asleep: The Sandbox failed: …

Why. The Runner couldn’t start the Session’s microVM. It needs a Mac with Apple Silicon or Linux with KVM, and the memory and CPUs the Environment asks for.

Fix.

  • On Linux: run kndl doctor on the Runner’s machine, and see KVM access.
  • Not enough room: lower the Environment’s CPUs or Memory (MiB), or put other Sessions to sleep.
  • Otherwise: restart the Runner with kndl runner install.

What you see. On the Repo’s Environment page, the Test build ends with Test build failed and the end of the failing step’s output:

The bootstrap script exited with 127:
bash: line 3: pnpm: command not found

Why. A Test build runs your scripts as a Session’s start would. What fails there fails every new Session.

Fix. Read the log, fix the draft, and run the Test build again. Apply turns on once a Test build of that exact draft passes. Install tools in the Bootstrap script, and set up the clone, such as its dependencies, in the Start script.

If it fails before cloning with The GitHub App isn't installed on owner/name, so a Test build can't clone it: …, install the App on the Repo: see The GitHub App is not installed on the Repo.

What you see. New Session or a Repo’s Environment page says one of:

  • The GitHub App isn’t installed on owner/name, or there’s no such Repo.
  • You don’t have access to owner/name on GitHub.

Why. You can see and change only Repos you have access to on GitHub, and only those the GitHub App is installed on.

Fix. Check the Repo’s name. Then:

  • App not installed: follow Install the App, add the Repo, and press Check again.
  • No access: have the Repo’s owner add you on GitHub, then press Check again.

What you see. Saving an Environment or a Shared variable is refused with one of:

NPM_TOKEN is Sensitive, but the Hub has no HUB_SECRETS_KEY to encrypt it with. …
The value of NPM_TOKEN is under 4 characters: too short to redact from output. Make it Plain, or use a longer value.

Why. The Hub encrypts Sensitive values with HUB_SECRETS_KEY, and hides them in everything Sessions show, which a very short value would defeat.

Fix.

  • No key: whoever runs the Hub makes one with kndl secrets key, puts it in hub.env, and runs kndl hub install.
  • Too short: make the variable Plain, or use the real, longer value.

What you see. New Session says Add your setup token first, or a Session went to sleep saying its Creator has none, or removed or replaced theirs.

Why. A Claude Code Session, and Claude’s Models in any Session, run on the Creator’s Claude credential, and a Runner has none of its own. Removing or replacing a credential, or removing its owner as a Member, puts their awake Sessions to sleep.

Fix. The Session’s Creator adds theirs and wakes it. A Session whose Creator is no longer a Member stays readable, but can’t wake.

What you see. New Session says Connect a Provider first, its Model list says No Models yet. Connect a Provider on your Account page., or a Session went to sleep with:

Put to sleep: it runs on the Models of alice, who started it, and they have none

Why. A pi Session runs on its Creator’s Models: those of their Connected providers, and Claude’s when they have a Claude credential. A Runner has none of its own.

Fix. The Session’s Creator connects a Provider, or adds their Claude credential, and wakes it.

What you see. In a pi Session, a Turn’s footer says Failed, with the reason under it, such as:

The Session's Creator hasn't connected OpenAI: they connect it on the Account page.

Why. The Provider of the Session’s Model refused the call, or the Creator disconnected it. A sign-in the Provider stopped renewing shows It doesn’t work anymore on its card on the Account page.

Fix. The Creator connects the Provider again, or switches the Session’s Model, and sends the prompt again.

Switching between Claude Code and pi is refused

Section titled “Switching between Claude Code and pi is refused”

What you see. Picking a Model the other Harness runs shows one of:

RefusalFix
build-box doesn't run both Claude Code and pi: update it to switch this Session to Claude Code. (or … to pi.)The Session’s Runner runs one Harness alone, or hasn’t said which it runs since the Hub started. Wait until it’s online, or see New Sessions run Claude Code.
You have no Claude credential: add your setup token on the Account page.Add your Claude credential, then pick the Model again.
You have no Models to run a pi Session on: connect a Provider on the Account page.Connect a Provider, then pick the Model again.

Why. A switch stops one Harness and starts the other on the Session’s Runner, so the Runner must run both, and you must have what the other runs on.

Fix. As the table says. The Session stays on the Model it ran on meanwhile.

What you see. After you pick one of pi’s Models, the Session goes Asleep, and its transcript says:

The Session is Asleep: pi could not start on build-box: the Sandbox could not be readied for pi: its Sandbox was made before pi, so it runs pi once it sleeps and wakes

Why. The Session’s Sandbox was started before its Runner had pi, and was kept across a Runner restart.

Fix. Press Wake now. The Session wakes on pi, with a Handoff of what happened on Claude Code.

The agent doesn’t know what happened before a switch

Section titled “The agent doesn’t know what happened before a switch”

What you see. After a switch between Claude Code and pi, the Session’s history says:

pi started without a handoff of what happened on Claude Code: its mod doesn't take one.

Why. The mod the Runner loaded into the Session is from before Handoffs, so it takes none.

Fix. Tell the agent what it needs in your next prompt. A Runner on the Hub’s commit, with its mod built (bun run mod:build in a checkout), loads a mod that takes them.

What you see. New Session’s Model lists only Anthropic · Claude Code, or New Session says Add your setup token first though you connected a Provider. Or a start fails with:

… This Runner doesn't run pi Sessions: its log says why.

Why. The Runner can’t run pi, so it runs Claude Code Sessions alone. With Any online Runner, New Session offers pi’s Models only when every online Runner runs pi. A Runner gets pi as it starts: see What a Runner downloads.

Fix. On the Runner’s machine, find why in its log:

Terminal window
kndl logs runner -n 10000 | grep 'Sessions run Claude Code alone'

Fix what it names, such as no route to the npm registry or nodejs.org, then restart the Runner with kndl runner stop and kndl runner start. Meanwhile, pick a Runner that runs pi in Runner.

What you see. The prompt box is off, there’s no Terminal, and a command is refused with:

Only Alice Lee, who started this Session, can drive it: it runs on their Connected providers.

A Claude Code Session’s says it runs on their Claude credential.

Why. Only a Session’s Creator prompts it, answers it, stops it, controls it and uses its terminal. Everyone else watches.

Fix. Ask its Creator, or start a Session of your own on its Work branch once it’s pushed.

What you see. Saving on the Account page says one of:

MessageFix
Anthropic rejected this token: …It was revoked, expired, or copied in part. Run claude setup-token again and paste the new one on one line.
That isn't a Claude setup token: it starts with sk-ant-oat.Paste the whole token claude setup-token printed.
API keys aren't taken for now. …Run claude setup-token, and paste the token it prints.
That doesn't look like a whole token. …Copy it again, all on one line.
This Hub can't store a Claude credential: it needs HUB_SECRETS_KEY …Whoever runs the Hub sets HUB_SECRETS_KEY, as for Sensitive variables.
Saved without checking it: …Saved, but the Hub couldn’t reach Anthropic to check it. If it’s wrong, Turns fail: replace it then.

What you see. A link to a Session says There is no such Session., a teammate’s Session isn’t in your list, or one you were in disappears.

Why. You see only the Sessions of Repos you have access to on GitHub, on which the GitHub App is installed.

Fix. Have the Repo’s owner add you on GitHub, or install the App on the Repo. Its Sessions appear within a few minutes, with no reload. A Hub without the GitHub App shows no Sessions to people signed in with GitHub: set up the GitHub App.

What you see. A Session nobody uses stays Active long after 15 minutes.

Why. Something keeps it busy: a Turn or subagent running, a prompt queued, someone with the Session open, or Keep awake, which the line under the Session’s title shows as “Kept awake by …”. See Going to sleep.

Fix. Turn Keep awake off, or press Sleep now.

What you see. Restart or Sleep now shows a refusal:

RefusalFix
The Session is still starting; restart it once it has started.Wait for the Starting… banner to go.
A Turn is running: stop it first, then restart. or A Turn is running: stop it first.Stop the Turn, or wait for it to end.
Prompts are waiting in the Session's queue.Cancel the queued prompts, or let them run.
The Session's Runner is offline.See A Session is Frozen.
Only an Active Session can be put to sleep; this one is Asleep.Nothing: it’s asleep.

What you see. A Session shows Environment changed: This Sandbox runs version 2 of owner/name's Environment; version 3 is the latest.

Why. Someone applied a new version of the Repo’s Environment, and a running Sandbox keeps the version it started on.

Fix. Press Restart when it suits you. The Session wakes on a fresh Sandbox, with its Workspace and conversation. Anything it installed outside the Workspace is gone: see Environments.

kndl is an independent project. It is not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic, PBC. About kndl