Claude Code plugin
Install the plugin, sign in and give tasks to a workspace from Claude Code.
Last updated
On this page
Description and operation
General
The Kloudlite plugin lets Claude Code on your laptop work in your workspaces and environments. Claude Code is the AI agent, and it does all its work through the agent tools. No command, file read or file write runs on the laptop. The plugin is part of kloudlite: kloudlite claude writes it to the folder claude-plugin in the kloudlite configuration folder (~/.config/kloudlite) and starts Claude Code with it. It works for one session, and reaches a workspace only through that session.
| Part | Function |
|---|---|
Tool server kl | Runs as kloudlite mcp and sends each call through the session. |
| kl mode | Refuses every tool that runs, reads or writes on your computer. /kloudlite:on and /kloudlite:off switch it. |
Skills kloudlite, orchestrate, develop | Give Claude Code the concepts, the rules for a main session and a flow for code changes. |
Agents kl-workspace, kl-subagent | Do the work in one workspace. The agent of a workspace can ask for subagents. |
The main session is the Claude Code session that you talk to. It does not read or change code. It creates, starts, stops and deletes workspaces and environments, and gives each code task to the kl-workspace agent of the workspace that owns the code. It uses the Claude Code tools Agent and SendMessage for this. The file and command tools are those of the tool server of each workspace. An agent ends its work with a report that starts with one of these words.
| Word | Meaning |
|---|---|
DONE | The task is complete. |
BLOCKED | The agent cannot continue. The report gives the cause. |
NEED | The agent needs a decision or information. |
SUBAGENT | The agent asks for a subagent for a part of the task. |
With kl mode on, a tool that runs, reads or writes on your computer is refused with kl mode: use the kl tools; nothing runs on this laptop. Other tools, such as the web tools, work. kloudlite claude starts Claude Code with kl mode on, but not when you resume a session with -r, --resume, -c, --continue or --session-id. Run /kloudlite:on in that session. This also starts one kl-workspace agent for each running workspace of the session.
The plugin acts with your rights, and a tool over a limit gets the same 409 as any other client. See Limits.
Tasks
Install the plugin
Reason for the task: Make Claude Code on your computer work with the Kloudlite tools.
Job set-up
- Access: you, or your agent. For a team session, a team member.
- Agent tool: none; an agent uses the SDK.
- Conditions:
kloudliteand Claude Code are installed, and a session exists. See Install kloudlite and Create a session. - References:
kloudlite claude,kloudlite mcp, Sessions API
Without -s, the command uses your selected session or your only session, and asks you to choose when there are several. Put arguments for Claude Code after --.
Procedure
Run this command with your team and session names. Leave out
-tfor your own team.kloudlite claude -t acme -s devEnter your password if the output asks for
sudo. This happens on macOS when the environment daemon is old or missing.Wait for the output line that starts with
kl tools:. Claude Code opens after it.
Close-out
- Make sure that the output shows
session, thenkl tools:, a number andready. Type/mcpin Claude Code to see the serverplugin:kloudlite:klconnected.
Sign in
Reason for the task: Give the plugin the credential of your account.
Job set-up
- Access: you. Only you can approve the login code in the browser.
- Agent tool: none; an agent uses the SDK.
- References: Sign in with kloudlite,
kloudlite login
kloudlite claude starts this login itself when you are not signed in.
Procedure
Run this command.
kloudlite loginOpen the address that the command prints, if the browser does not open.
Make sure that the code on the page is the code in the terminal. Confirm the login.
Close-out
- Make sure that the output shows
Logged in asand your user name.
Give a task to a workspace
Reason for the task: Make an agent change code in a workspace.
Job set-up
- Access: you, or your agent. For a team workspace, a team member whose access is not paused.
- Agent tool: none; an agent uses the SDK.
- Conditions: Claude Code runs with the plugin and kl mode on, and the workspace exists. The answer arrives when the agent ends its turn.
- References: Start a workspace, Tool server
Procedure
Type the task in Claude Code. Name the workspace and say what to change.
In the workspace api, add a /healthz route to the web server and run its tests.Give an answer when Claude Code asks, for example to start a stopped workspace or to confirm a delete.
Wait for the answer of Claude Code. It states if the agent reported
DONE,BLOCKEDorNEED.
Close-out
- Read the report of the agent. Open the session in the harness to examine the changed files.
Troubleshooting
| Symptom | Possible cause | Corrective action |
|---|---|---|
claude is not on PATH: install Claude Code first | Claude Code is not installed, or its folder is not in the PATH. | Install it, add its folder to the PATH and run the command again. |
that login expired or was denied — run kloudlite login again | The login code expired, or you denied it. | Sign in again. |
the kl tools did not answer within 180 s, closed before answering, answered with no tools, or the kl tools failed: … | The session did not start, or closed the connection. | Run the command again. If it repeats, stop the session and start it again. |
choose a session with --session … | You have more than one session, none is selected, and the command has no terminal to ask on. | Add -s with the session name or id. |
environment daemon install failed; run: sudo kloudlite env daemon install | The password for sudo was not accepted, or the install failed. | Run the command in the message, then kloudlite claude again. |
kl mode: use the kl tools; nothing runs on this laptop | Claude Code tried a tool that runs on your computer while kl mode is on. | Use a kl tool, or run /kloudlite:off to work on your computer. |
403 with your access to acme is paused | A team admin paused your access. | Ask a team admin to unpause it. |
409 with a limit name, for example workspaces: 5 of 5 in use; request more under Quota | The owner has no quota left. | Delete an unused item, or see Quota and requests. |