In the previous Teammates chapter, we learned how to spawn background agents to help us multitask.
We have built a powerful system: it has a brain (Query Engine), hands (BashTool), and helpers (Teammates).
But claudeCode isn't just a standard chatbot. It includes several "Secret Weapons"βspecialized modes and behaviors designed to handle complex, real-world coding scenarios.
In this chapter, we will tour five unique features that make the application feel "smart": The Buddy System, Kairos, Ultraplan, Auto-Dream, and Remote Bridge.
Programming alone can be error-prone. You might write a bug and not notice it until hours later.
The Buddy System is a specific configuration of a Teammate that acts as a silent observer. It watches every file change you make and runs a quick "sanity check" in the background.
If you enable the Buddy System:
save event.Most AI models exist in a timeless void. They don't know if a command takes 1 second or 1 hour.
Kairos (Greek for "opportune moment") is the system's internal clock. It allows the AI to understand duration and deadlines.
If you ask the AI to "Run the test suite," and the suite hangs for 30 minutes, a standard AI would wait forever. Kairos watches the clock. If a task takes unusually long, it interrupts: "This is taking too long. Should I kill the process?"
Here is how Kairos might check constraints inside the Query Engine loop.
// features/kairos/timer.ts
function checkTimeBudget(startTime, budgetMinutes) {
const now = Date.now();
const elapsed = (now - startTime) / 1000 / 60; // in minutes
if (elapsed > budgetMinutes) {
// Stop the AI from thinking further
throw new Error("Kairos Alert: Time budget exceeded.");
}
}
Explanation: This simple check prevents the AI from burning through your API credits on a stuck task.
For simple tasks, the AI just acts. But for huge tasks (e.g., "Rewrite the entire database layer"), acting immediately is dangerous.
Ultraplan is a mode where the AI creates a structured Markdown checklist before it runs a single command. It forces the AI to be an Architect before it becomes a Builder.
plan.md).
When you step away from your computer, claudeCode doesn't have to sleep.
Auto-Dream allows the system to run low-priority tasks when the user is idle. It uses the Auto-Mode Classifier to find safe tasks, like:
It's like a Roomba for your code. It cleans up the dust while you are away.
Sometimes, the code you want to edit isn't on your laptop. It's on a server in the cloud.
Remote Bridge allows claudeCode to connect to a remote machine via SSH and treat it as if it were local.
It uses the Model Context Protocol (MCP) to tunnel commands.
ls on the server.Let's look closer at Ultraplan, as it is the most commonly used unique feature.
Ultraplan works by injecting a special "System Prompt" into the Query Engine. This prompt forbids the AI from using tools like FileEditTool until it has used the PlanTool.
We track whether we are in "Planning Phase" or "Execution Phase" in State Management.
// features/ultraplan/state.ts
export const planStateAtom = atom({
isPlanning: false,
currentPlan: [], // List of steps
currentStepIndex: 0
});
The AI calls this tool to save its strategy.
// features/ultraplan/PlanTool.ts
export const PlanTool = buildTool({
name: "create_plan",
description: "Create a step-by-step plan before coding.",
// Input: A list of strings
inputSchema: z.object({ steps: z.array(z.string()) }),
async call({ steps }, context) {
// Save the plan to state
context.setPlan(steps);
return "Plan saved. Ask user for approval.";
}
});
Explanation: This tool doesn't edit code. It simply saves a JavaScript array of steps into memory.
In the main loop, we check the state.
// features/ultraplan/guard.ts
function checkPlanGuard(toolName, planState) {
// If we have a plan, but haven't finished Step 1...
if (planState.isPlanning && toolName === 'FileEditTool') {
// Block the edit!
throw new Error("You must approve the plan first.");
}
}
Explanation: This ensures the AI respects the architectural phase and doesn't "jump the gun."
These unique features distinguish claudeCode from simple script runners:
You have learned about the "Secret Weapons" of claudeCode:
Now, we are ready for the most experimental and futuristic chapter of all. What if the AI could stop typing code and start using your computer like a human?
Generated by Code IQ