mirror of
https://github.com/dtzp555-max/memory-continuity.git
synced 2026-07-23 22:15:07 +00:00
4.3 KiB
4.3 KiB
name, description
| name | description |
|---|---|
| memory-continuity | Preserve short-term working continuity for OpenClaw agents when recent in-flight work gets lost after gateway interruption/restart, model fallback or unavailability, /new or fresh sessions, context compaction, or silent execution-agent reporting gaps. Use when you need memory/CURRENT_STATE.md, dual reporting discipline, continuity doctor checks, or repair of continuity drift across agent workspaces. |
Memory Continuity
Use this skill to prevent agents from forgetting what is currently in flight when continuity breaks in practical ways: gateway interruption/restart, model fallback/unavailability, /new or fresh sessions, context compaction, or worker results not being surfaced upward in time.
Use memory/CURRENT_STATE.md as a small overwrite-oriented workbench, not as a journal.
Core rules
- Ensure every agent workspace has
memory/CURRENT_STATE.md - Keep
CURRENT_STATE.mdsmall- main: target 25-40 lines, hard cap 50
- other agents: target 15-25 lines, hard cap 30
- Required sections:
In FlightBlocked / WaitingRecently FinishedNextReset Summary
- Update only on state changes, not on a timer
- Remove stale items instead of endlessly appending
Minimal JIRA-like workflow
Keep the workflow small. Use these task states only:
planneddispatchingin_progressblockedreviewingdone
State meaning:
planned: task exists and has been defineddispatching: main has initiated delegation, but does not yet have enough evidence that the worker truly launchedin_progress: worker/session has visible execution evidenceblocked: task cannot safely proceed right now (including launch failure, stalled worker, model failure, auth/tool issues)reviewing: deliverable exists and main is validating itdone: main has accepted the result and updated Tao
Evidence rule:
- Do not upgrade a task state without an evidence point.
- Good evidence points include: non-empty worker session history, worker accepted/milestone reply, commit, branch, PR, release, or runtime log.
sessions_spawn acceptedalone is not enough to claim real progress.
Timeout rules:
- If a worker has no first visible response/evidence within 10 minutes after dispatch, mark the task
blockedwith reasonlaunch failure. - If a worker has an ETA and passes that ETA without a milestone, mark the task
blockedwith reasonstalled. - Silence is not neutral; unexplained silence is a process failure signal.
Dual reporting protocol
Worker → main
Execution agents must report to main at:
- accepted
- blocked
- milestone
- done
- model/environment abnormal
Preferred reply format:
statussummaryevidencerisknext
main → Tao
Main must report to Tao at:
- task formally started
- worker truly in progress (not merely spawn-accepted)
- blocked
- milestone reached
- task/phase completed
Preferred Tao update format:
- who
- status
- output
- next
Ordering rule:
- When a worker reports milestone/completion/blocker, first update
CURRENT_STATE.md, then update Tao, then continue with review/commit/next dispatch. - If no evidence point exists yet (sessionKey with trace / commit / branch / PR / log), do not claim work has already started; say it is about to start.
When to use the doctor
Run scripts/continuity_doctor.py when:
- OpenClaw was upgraded
- gateway restarted and continuity feels suspicious
- an agent seems to have lost short-term context
- you need to confirm
CURRENT_STATE.mdcoverage across workspaces
How to use the doctor
From the main workspace:
python3 skills/memory-continuity/scripts/continuity_doctor.py \\
--main-workspace /Users/taodeng/.openclaw/workspace/main \
--agents-root /Users/taodeng/.openclaw/workspaces
The doctor checks:
- main
memory/CURRENT_STATE.mdexists - all agent workspaces have
memory/CURRENT_STATE.md - required sections exist
- line-count caps are respected
AGENTS.mdstill contains continuity + dual reporting rules
Repair strategy
If drift is found:
- Restore/create missing
memory/CURRENT_STATE.md - Restore continuity guidance in
AGENTS.md - Re-run doctor
- Only then investigate deeper behavioral failures
References
- For template and limits: read
references/template.md - For doctor semantics and PASS/WARN/FAIL meanings: read
references/doctor-spec.md