Skip to main content
Updated Feb 23, 2026

Your Employee Delegating to Claude Code

Prerequisites

This lesson requires tmux (a terminal multiplexer) and Claude Code (from Chapter 3) installed on your machine. The first exercise checks for tmux and installs it if needed. If you do not have Claude Code installed, revisit Chapter 3 before continuing.

Your employee has been handling tasks on its own: creating files, setting up morning briefings, doing research, managing your schedule. For tasks like "create weekly-goals.md" or "design a daily routine," it uses its own built-in tools and does fine.

But what happens when you need actual code written? A Python script, a data processing tool, a file organizer? Your employee is not a coding specialist. It will try -- and it may produce something -- but it is not the right tool for the job.

You already have the right tool. Claude Code is on your machine from Chapter 3. In this lesson, you are going to teach your employee to delegate coding work to Claude Code -- and then verify the delegation is real.

Why Delegation Needs to Be Explicit

Your employee will not discover Claude Code on its own. If you ask it to "build a Python calculator," it will attempt to write code itself or, worse, claim it delegated the work to Claude Code when it actually did not. It may even give you a fake session ID and a working directory that does not exist.

This is not a bug. It is how language models work. They produce plausible responses, which sometimes means plausible claims about actions they did not take.

The fix: tell your employee clearly that coding tasks go to Claude Code, and that it should use tmux sessions to run them. You set the rule once. Your employee handles the terminal commands. You verify the work is real.


Connect Your Employee to Claude Code

Step 1: Make Sure tmux Is Ready

Send this to your AI Employee through your messaging channel:

Check if tmux is installed on this machine. If not, install it.
Confirm with the version number.

tmux lets your employee run terminal sessions in the background. Your employee will create tmux sessions, run Claude Code inside them, and report back to you in your messaging channel. You can attach to these sessions from your own terminal and watch the work happen live.

Step 2: Set the Delegation Rule

This is the one-time instruction that changes how your employee works:

From now on, when I ask you to build or write code, use Claude Code
to do the work -- do not write code yourself.

Run Claude Code inside tmux sessions so I can attach and watch.
Always tell me the session name so I can verify with tmux ls.

Your employee should confirm it understands. Something like: "Understood -- for coding tasks, I'll spin up Claude Code in tmux sessions and give you the session name to verify."

That is the entire setup. You told your employee what tool to use and how you will verify. Your employee already has terminal access -- it knows how to run tmux commands. You do not need to spell out the exact syntax every time. You are the manager setting the rule; your employee handles the mechanics.


Exercise 1: Your First Delegated Task

Send this to your employee:

Build me a simple Python calculator with add, subtract, multiply,
and divide functions. Include a demo in the main block.
Tell me the session name when Claude Code is running.

That is all you send. Your employee should create a tmux session, launch Claude Code with the task, and report the session name back to you.

Now open a terminal on your machine and verify:

tmux ls

You should see a session in the list. Attach to it:

tmux attach -t <session-name>

You are watching Claude Code work in real time. It is writing files, creating functions, building your calculator. This is real delegation -- verified by your own eyes. Detach with Ctrl+B then D to let it continue.

When it finishes, find and run the output:

python calculator.py

The files exist. The calculator runs. Your employee handled the tmux commands, Claude Code wrote the code, and you verified every step.

If tmux ls shows nothing: Your employee claimed to delegate without actually running the commands. This is the hallucination problem described above. Send this follow-up:

I just ran tmux ls and there are no sessions. You did not actually
run Claude Code. Please do it now -- create the tmux session and
run Claude Code for real. I am watching tmux ls in my terminal.

Reinforcing that you are actively verifying usually resolves it. If your employee still cannot execute shell commands, it may not have terminal access configured -- check your OpenClaw setup from Lesson 2.

Exercise 2: A Tool for Your Work

Now build something relevant to YOUR role. Pick one and send it:

Build me [CHOOSE ONE]:
- A Python script that reads a CSV file and prints a summary
with totals and averages
- A Python script that organizes files in the current directory
into folders by file type
- A Python script that converts a markdown file to a styled
HTML page

Tell me the session name when it is running.

Verify:

tmux ls
tmux attach -t <session-name>

Watch Claude Code build something useful for you. When it finishes, test the output with your actual files.

Exercise 3: Research Then Build

This one combines what your employee does well with what Claude Code does well:

I want to automate [A REPETITIVE TASK FROM YOUR WORK].
First, research the best approach -- what tools exist, what method
would work for my situation. Give me a summary of your research.

Then, once I approve, use Claude Code to build a working prototype.

Notice the two phases. Your employee does the research first -- it has your context from MEMORY.md, it knows your work patterns, it can use web search. When you approve the approach, it delegates the coding to Claude Code via tmux. Two different capabilities, one result.

After you approve and it starts building, verify the same way:

tmux ls
tmux attach -t <session-name>

What Just Happened

You built a real delegation chain:

LayerWhoWhat They Did
YouManagerGave high-level instructions through your messaging channel
Your Employee (OpenClaw)CoordinatorSpun up tmux sessions, launched Claude Code, reported back
Claude CodeCoderWrote actual code in a verifiable tmux session

This is the two-tier delegation pattern from Chapter 1 -- and you have seen it work. Not a textbook claim. You ran tmux ls, you attached to the session, you watched Claude Code writing code.

The key insight: you managed, your employee coordinated. You set one rule -- "use Claude Code for coding tasks" -- and your employee handled the mechanics: creating sessions, launching the right tool, reporting session names. You never typed a single tmux command into your messaging app. Your job was deciding what to build and verifying the work was real.

Compare this to Chapter 3, where you used Claude Code directly. You typed every instruction. You watched every output. Now your employee handles the coordination. You say what you want built; it manages the rest.


What Transfers

ConceptWhat You Experienced
Rule-based delegationYou set the rule once; your employee handled the mechanics every time
tmux as infrastructureBackground sessions let agents work while you verify
Verification over trusttmux ls and tmux attach prove work is real, not hallucinated
Context stays with employeeResearch and intent lived with your employee, coding went to Claude Code
You are the managerYou decided what to build, your employee decided how to run it

Try With AI

Prompt 1: Parallel Delegation

I need two things built at the same time:
1. [TASK 1 FOR YOUR WORK]
2. [TASK 2 FOR YOUR WORK]

Run them in separate tmux sessions with Claude Code so they work
in parallel. Give me both session names.

What you're learning: Parallel delegation. Your employee creates two independent tmux sessions, each running Claude Code on a different task. Run tmux ls to see both sessions listed, and attach to each one to watch the work happen simultaneously.

Prompt 2: Fix and Iterate

The tool you built in Exercise 2 needs a change:
[YOUR SPECIFIC FEEDBACK].

Send the fix to Claude Code in the same session.

What you're learning: Iteration through delegation. You give feedback in plain language, your employee sends the update to Claude Code. Same pattern from every lesson -- give intent, let the employee coordinate, verify the result.

Prompt 3: Explain the Chain

Describe in plain language what happened across these exercises.
What tasks did you handle yourself (research, file creation)?
What tasks did Claude Code handle?
Why did I set the rule about using Claude Code for coding instead
of letting you write code yourself?

What you're learning: Getting your employee to articulate the delegation pattern. Its answer reveals whether it understands the principle: the right tool for the right job, with verification to make sure the work actually happened.