OpenClaw BOOT.md Startup Task Configuration Guide: Auto-Load Memory and Restore Tasks at Launch

OpenClaw’s BOOT.md automatically handles initialization before each session starts, solving recurring problems such as repeated context acquisition, poor cross-day task recovery, and opaque environment issues. Its core capabilities include memory loading, task restoration, and environment self-checks. Keywords: OpenClaw, BOOT.md, startup tasks.

Technical Specifications Snapshot

Parameter Description
Project/Mechanism OpenClaw startup task configuration
Core Files BOOT.md, HEARTBEAT.md, memory/MEMORY.md
Language Markdown, Shell commands
Trigger Protocol Automatically executed when a session starts
Star Count Not provided in the source
Core Dependencies OpenClaw Runtime, lark-cli, Workspace filesystem

BOOT.md Serves as OpenClaw’s Startup Orchestration Entry Point

At its core, BOOT.md is a startup task instruction file located in the Workspace root directory. It runs automatically once whenever a new conversation is created or the service restarts, allowing the Agent to complete essential preparation before it begins responding.

It does not solve a content generation problem. It solves startup state consistency. Without BOOT.md, the Agent must reconstruct user context every time. With BOOT.md, the system restores context first and only then enters interaction.

OpenClaw BOOT startup workflow diagram AI Visual Insight: The image presents an OpenClaw BOOT-themed illustration that highlights preloading during the startup phase. Semantically, it maps to the workflow entry point where the Agent completes context assembly, state restoration, and environment preparation before the formal conversation begins.

BOOT.md and HEARTBEAT.md Have Different Responsibilities

BOOT.md focuses on the startup moment and emphasizes low-latency initialization. HEARTBEAT.md focuses on periodic scheduling and emphasizes timed background execution. They do not replace each other; together they form a coordinated model of foreground readiness and background maintenance.

File Trigger Method Execution Frequency Typical Use Cases
BOOT.md Automatically triggered at every startup Every new session Initialization, state restoration, environment checks
HEARTBEAT.md Time-based trigger Runs on a schedule Scheduled tasks, inspections, automated workflows
## Startup Rules
- BOOT.md handles short tasks that must run immediately at startup
- HEARTBEAT.md handles periodic background tasks
- Both should avoid blocking the main interaction for too long

This rule set clarifies the boundary between startup tasks and heartbeat tasks, preventing responsibility overlap.

A High-Quality BOOT.md Should Include Four Core Task Categories

The first category is memory loading. The system first reads the index in memory/MEMORY.md, then loads the user profile, project background, and active memories based on that index, and finally marks any content not updated for more than 30 days as “needs verification.”

The second category is task state restoration. It checks whether the previous conversation left unfinished work. If so, it generates a list and asks whether the user wants to continue, which avoids repeated context explanation during cross-day collaboration.

The Template for Memory Loading and Task Restoration Is Directly Usable

## Step 1: Load Memory
- Read `memory/MEMORY.md` and load the memory index  # Core entry point: get the index first
- Load `user_profile.md` based on the index          # Core entry point: restore the user profile
- Load memory for the current project context        # Core entry point: restore business context
- Mark memories not updated for over 30 days as "needs verification"  # Core entry point: control memory staleness risk

## Step 2: Restore Task State
- Check unfinished tasks from the previous conversation  # Core entry point: identify interruption points
- Output the unfinished task list and ask whether to continue  # Core entry point: let the user resume with one decision

This template restores both long-term context and short-term task state during startup.

The third category is HEARTBEAT status inspection. BOOT does not execute scheduled tasks itself. Instead, it reads HEARTBEAT.md, summarizes the tasks scheduled for today, and reports the result of the most recent heartbeat run, especially failure causes.

The fourth category is environment self-checking. Typical actions include checking lark-cli --version and lark-cli auth status to determine whether local tools are available and whether authorization has expired, then outputting an executable readiness state.

Environment Self-Checks Should Turn Exceptions Into Actionable Conclusions

# Check whether lark-cli is installed     # Core logic: verify command availability
lark-cli --version

# Check Feishu authorization status       # Core logic: verify whether the identity can invoke capabilities
lark-cli auth status

These commands quickly determine whether dependencies and authorization are healthy during startup.

The Complete Template Should Enforce Sequential Execution Without Blocking on Single-Step Failure

The recommended BOOT.md structure is: load memory, restore tasks, inspect heartbeat status, run environment self-checks, and output a readiness report. The key design point is not how much it does, but whether it runs fast enough and tolerates failures.

## Execution Order
Run the following tasks in sequence. Failure in any step does not affect subsequent steps.

## Step 1: Load Memory
- Read the index and restore the user profile and project background

## Step 2: Restore Task State
- Output unfinished tasks and ask whether to continue

## Step 3: Preview Heartbeat Tasks
- Read `HEARTBEAT.md`
- Output today's tasks and the last execution result

## Step 4: Environment Self-Check
- Check `lark-cli` version and authorization status

## Step 5: Readiness Report
- Output "Loaded [N] memories, [N] scheduled tasks today, environment [healthy/unhealthy]"

The value of this template lies in standardizing startup actions and compressing system state into a readable readiness report.

BOOT Task Design Must Follow Three Engineering Principles

First, complete quickly. BOOT should usually finish within a few seconds. Avoid heavy retrieval, broad scans, or long-chain API calls. At startup, the goal is to become operational, not to perform full analysis.

Second, isolate failures. A failure in one step must not bring down the entire startup sequence. For example, a Feishu authorization issue should not affect memory loading, and a missing memory index should not block environment checks.

Conditional Startup Can Further Improve Experience and Reduce Noise

## Conditional Startup Logic
### Weekday mornings (08:00-10:00)
- Run the full flow: memory + tasks + heartbeat + self-check
- Also output today's meeting schedule

### Other times
- Run the lightweight flow: memory + self-check
- Skip heartbeat preview to avoid repetitive reminders

### Mondays
- Also output a summary of unfinished tasks from last week

This logic dynamically adjusts startup overhead and information density based on time-specific scenarios.

Third, keep output restrained. The readiness report should ideally stay within 3 to 5 lines and include only information the user needs for immediate decisions, such as memory count, unfinished task count, scheduled task count, and environment anomalies.

The Minimum Viable Practice Is to Make It Work First, Then Enhance It Iteratively

If you are just starting to configure OpenClaw, the minimum approach is to first build the skeleton for the four task categories, then validate each item one by one: Does it execute automatically after restart? Can it surface unfinished tasks? Does it report expired authorization correctly? Is the report concise enough?

In practice, start by getting task restoration right. It delivers the biggest perceived improvement because the real time sink is usually not generation, but repeatedly rebuilding context.

FAQ

FAQ 1: Where should I place BOOT.md for it to take effect?

Answer: Place it in the root directory of the OpenClaw Workspace. It runs automatically once whenever a new conversation starts or the service restarts.

FAQ 2: Why not put all automation tasks into BOOT.md?

Answer: Because BOOT is designed for fast readiness with low-latency initialization. Time-consuming tasks should be moved to HEARTBEAT.md to avoid blocking the user from getting started.

FAQ 3: What capability is most worth implementing first in BOOT.md?

Answer: Prioritize task state restoration and memory loading. The former directly reduces the cost of cross-day task switching, while the latter ensures the Agent starts with stable context.

Core summary: This article systematically reconstructs the OpenClaw BOOT.md startup mechanism, explaining how to configure memory loading, task restoration, HEARTBEAT inspection, and environment self-checks during startup, along with directly usable templates, execution principles, and conditional startup strategies.