C Claude Code Internals
EN | ES

Proactive Mode (KAIROS)

KAIROS is an experimental autonomous mode where Claude Code stays alive between user messages. It acts on its own initiative, changes behavior based on terminal focus, and is explicitly biased toward action.

KAIROS feature flag name <tick> keep-alive signal
! KAIROS is experimental: not available in standard builds
The KAIROS / PROACTIVE feature flag exists in the source code but is not enabled in standard Claude Code releases. This page documents the architecture as found in the code.

How it works

<tick> prompts

Instead of waiting for user input, Claude receives periodic <tick> signals. These keep the agent alive and trigger autonomous decision-making.

Bias toward action

The prompt explicitly instructs Claude to read files, search, execute tests, make changes, and commit without asking. The default is to do, not to ask.

SleepTool is mandatory

If there is nothing useful to do, Claude MUST call the SleepTool. It is never allowed to respond with 'still waiting' or idle text without sleeping first.

Behavior by terminal focus

Terminal unfocused
  • Acts fully autonomously
  • Decides, explores, commits, pushes
  • No prompts or confirmations
  • Maximum initiative mode
Terminal focused
  • More collaborative behavior
  • Shows options to the user
  • Asks before large changes
  • Reduced initiative mode

The tick loop

1
<tick> signal received
The system sends a tick to keep the agent alive.
2
Assess terminal focus
Is the terminal focused? Determines collaboration vs. autonomy level.
3
Find useful work
Scan for files to read, tests to run, changes to make, commits to push.
4
Work is available?
Execute it autonomously (unfocused) or show options (focused).
5
No work available
Must call SleepTool. Cannot output idle text.
6
Wait for next tick
Sleep until the next tick signal arrives.
This is how agentic workflows are designed to work
The KAIROS architecture reveals the intended end-state for Claude Code: a persistent agent that works continuously in the background, not just when you type. The current interactive mode is a stepping stone toward this model.