the tiny file that makes openclaw feel less fragile
one active_task.json file can stop the agent from guessing after interruptions, stale context, and half-finished workflows.
openclaw starts feeling fragile when memory gets asked to track live work.
durable context belongs in memory.
active work needs a current position.
after a gateway restart, messy session, or overnight pause, the agent shouldn’t rebuild the plan from old notes. it should read one small file that says where the job stopped.
call that file the state object.
think of it as the job card.
inside that card, openclaw finds the task, step, checked output, blocker, next move, and approval gate.
one visible file beats another pile of vague context.
why memory gets blamed
beginners usually describe the pain as forgetfulness.
technical operators see a missing state record.
both are looking at the same failure from different angles.
openclaw memory is useful because it lives in files you can inspect.
trouble starts when temporary progress gets mixed with long-term context.
memory might hold preferences, client rules, folder habits, and style notes.
current work needs a different record.
current task: finish the openclaw state object article
current step: final publish review
last checked output: cleaned article draft
blocked by: user approval
next move: paste into substack after title selection
approval needed before: publishingone record helps the agent understand the operator.
another helps it find the job again.
mixing those records creates weird behavior. old preferences compete with live tasks. temporary notes start acting permanent. stale plans return during new work. token spend rises while the agent still guesses.
pick one workflow first
don’t state-track your whole business yet.
choose a repeated job with a clear output.
good starter options include a weekly research packet, inbox triage draft, lead review report, client follow-up packet, bug investigation note, content draft workflow, or local file cleanup review.
weak starter options sound like “run my company,” “manage my inbox,” “handle my research,” “fix my computer,” or “automate my life.”
shape is the difference.
use a task with a start, a stopping point, and a review moment.
make the folder
inside your openclaw workspace, create this path:
workspace/
state/
active_task.json
consistency matters more than the folder name.
openclaw needs one obvious place to check before it resumes interrupted work.
create the first job card
paste this into active_task.json.
{
"task_id": "weekly_research_packet_2026_05_31",
"task_name": "weekly research packet",
"status": "paused",
"current_step": "collecting source links",
"last_verified_output": "none",
"open_questions": [
"which topic cluster should get priority"
],
"blocked_by": [
"waiting for final source selection"
],
"next_action": "ask the user to pick the strongest topic cluster before drafting",
"needs_human_review_before": [
"publishing",
"sending email",
"saving new long-term memory",
"deleting or overwriting files"
],
"last_updated": "2026-05-31"
}
now the agent has a practical answer before it acts:
where should openclaw restart without guessing?
read the fields without jargon
task_id gives the job a unique name.
task_name gives humans a readable label.
status tells the agent whether the work is active, paused, blocked, waiting for review, or completed.
current_step should name the exact work in progress.
weak:
working on article
better:
checking the article draft for repeated phrasing before final publish review
last_verified_output names the most recent result you trust.
open_questions holds anything openclaw needs answered.
blocked_by explains what stopped progress.
next_action says the next move in one sentence.
needs_human_review_before marks actions with consequences, like sending email, posting online, deleting files, touching payments, changing permissions, or contacting clients.
last_updated shows when the file changed.
give openclaw the operating rule
paste this into the agent instructions for the workflow.
before resuming any paused or interrupted task, read workspace/state/active_task.json.
treat that file as the current task position.
don't treat long-term memory as the current task position.
if the state file is missing, stale, contradictory, or unclear, ask for confirmation before continuing.
update the state file when the task changes, a blocker appears, the next action changes, review becomes required, the task pauses, or the task completes.
don't store permanent preferences, secrets, client data, or broad project history in the state file.
don't continue medium-risk or high-risk work after restart until the state file has been reviewed.
from that point, the agent has to check the job card before it continues.
it reads, summarizes, and waits for approval.
use this after an interruption
resume the current openclaw task.
first, read workspace/state/active_task.json.
show me the task name, current status, current step, last verified output, blocker, next action, and anything that needs human review.
don't continue the task until i approve the next action.
that’s the safest beginner version.
no plugin, database, or custom app.
a visible file plus a review habit is enough for the first win.
add policy fields when the work gets riskier
use action rules when the workflow touches files, browser work, client delivery, code, or outbound messages.



