Hi folks. I've been running openclaw for ~two weeks and only just discovered I dont have a config.yaml file (simply missing from ~/.openclaw). Furthermore, my agent was remembering anything i asked it to remember. After some back and forth we came to realize the agent is writing to MEMORY.md (among other things i assume) but it doesnt persist. When I cat the MEMORY.md file nothing has changed. Anybody have a clue at to whats going on?
#Missing config.yaml and Openclaw reports he cant write to his own MEMORY.md
1 messages · Page 1 of 1 (latest)
There isnât a config.yaml in OpenClaw â config is JSON5.
1) Config file: where it actually lives
By default itâs here:
~/.openclaw/openclaw.json(JSON5)
You can confirm the exact path your running Gateway is using with:
openclaw config file
Docs: https://docs.openclaw.ai/help/faq#what-format-is-the-config-where-is-it
2) Memory file: itâs in the workspace, not ~/.openclaw/
MEMORY.md lives in the agent workspace (default: ~/.openclaw/workspace), not in the state dir.
Check what workspace your gateway is configured to use:
openclaw config get agents.defaults.workspace
Then look for:
<workspace>/MEMORY.md(ormemory.md)<workspace>/memory/YYYY-MM-DD.md
Docs:
- https://docs.openclaw.ai/help/faq#where-should-agentsmd-soulmd-usermd-memorymd-live
- https://docs.openclaw.ai/concepts/memory
3) If it âwrites to MEMORY.mdâ but nothing changes, the usual causes
One of these is almost always the culprit:
- Youâre
catâing the file on the wrong machine (remote mode writes on the gateway host, not your laptop) - The gateway is running under a different user (common if it was started with
sudoonce â writes under/root/.openclaw/...) - Youâre running in Docker without a persisted volume, so changes disappear when the container is recreated
- The workspace path exists but is not writable by the gateway process (permissions/ownership)
Quick next step (paste output)
These 3 usually reveal it immediately:
openclaw --version
openclaw gateway status
openclaw config get agents.defaults.workspace
(If gateway status shows âConfig (cli)â and âConfig (service)â pointing at different configs, thatâs also a big hint.)
$ openclaw --version
2026.3.2
$ openclaw gateway status
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-03-04.log
Command: /usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 77636, state active, sub running, last exit 0, reason 0)
RPC probe: ok
Listening: 127.0.0.1:18789
Other gateway-like services detected (best effort):
- ntth-proxy.service (user, unit: /home/avipe/.config/systemd/user/ntth-proxy.service)
Cleanup hint: systemctl --user disable --now openclaw-gateway.service
Cleanup hint: rm ~/.config/systemd/user/openclaw-gateway.service
Recommendation: run a single gateway per machine for most setups. One gateway supports multiple agents (see docs: /gateway#multiple-gateways-same-host).
If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host).
$ openclaw config get agents.defaults.workspace
/home/avipe/.openclaw/workspace
Nice â that output already tells us a lot:
- Youâre on 2026.3.2
- Gateway is running as a user systemd service
- Workspace resolves to:
/home/avipe/.openclaw/workspace - Config file path is where it would be (
~/.openclaw/openclaw.json), but itâs totally fine if that file doesnât exist (defaults kick in).
Now letâs narrow down why writes to memory donât show up on disk.
1) First: make sure youâre looking at the right memory file
In the workspace root, run:
ls -la /home/avipe/.openclaw/workspace | grep -i memory
You might have memory.md (lowercase) instead of MEMORY.md, or the bot might be writing daily notes under:
/home/avipe/.openclaw/workspace/memory/YYYY-MM-DD.md
2) Check if the workspace (and MEMORY.md) are actually writable
test -w /home/avipe/.openclaw/workspace && echo "workspace writable" || echo "workspace NOT writable"
ls -la /home/avipe/.openclaw/workspace/MEMORY.md /home/avipe/.openclaw/workspace/memory.md 2>/dev/null
If you see root root ownership anywhere in that workspace, thatâs usually from having run OpenClaw with sudo at some point â and then the normal user service canât update the files.
3) Quick âsentinelâ test (proves whether itâs writing anywhere)
Ask your bot (in whatever chat you normally use with it):
âPlease write
MEMTEST-123into memory now (MEMORY.md).â
Then immediately run:
grep -R "MEMTEST-123" -n /home/avipe/.openclaw/workspace 2>/dev/null
4) If itâs failing, the log usually says why (permissions / read-only)
grep -nEi "EACCES|EPERM|EROFS|permission denied|read-only|MEMORY\\.md|memory flush" /tmp/openclaw/openclaw-2026-03-04.log | tail -n 80
5) Also worth checking: are you using Docker sandboxing for the session?
If youâve enabled sandboxing, some sessions may run in a container with a different filesystem / mount mode.
openclaw config get agents.defaults.sandbox
If you paste results from (1) and (4), we can usually point to the exact fix (itâs very often âwrong file pathâ or âworkspace owned by rootâ).
$ test -w /home/avipe/.openclaw/workspace && echo "workspace writable" || echo "workspace NOT writable"
workspace writable
$ ls -la /home/avipe/.openclaw/workspace/MEMORY.md /home/avipe/.openclaw/workspace/memory.md 2>/dev/null
-rw-r--r-- 1 avipe avipe 817 Feb 24 11:13 /home/avipe/.openclaw/workspace/MEMORY.md
$ grep -R "MEMTEST-123" -n /home/avipe/.openclaw/workspace 2>/dev/null
[No output]
$ grep -nEi "EACCES|EPERM|EROFS|permission denied|read-only|MEMORY\.md|memory flush" /tmp/openclaw/openclaw-2026-03-04.log | tail -n 80
[No output]
$ openclaw config get agents.defaults.sandbox
Config path not found: agents.defaults.sandbox
Cool â this rules out the âpermissions / read-only filesystemâ theory. Workspace is writable and the MEMORY.md file is owned by your user.
At this point the two most common explanations are:
A) Youâre testing in a group / channel / thread context
Per the docs, MEMORY.md is only loaded in the main, private session â never in group contexts (to prevent public chats from poisoning your durable memory).
So if you asked it to write MEMTEST-123 from a Discord server channel/thread (or any group chat), it may intentionally not write to / use MEMORY.md, and will âforgetâ on purpose.
Can you confirm: did you run the MEMTEST-123 prompt in a DM with the bot (private), or in a server channel/thread?
Docs: https://docs.openclaw.ai/concepts/memory (see âMEMORY.md ⊠only load in the main, private sessionâ)
B) Youâre looking at the wrong agent workspace
If you have more than one agent (or bindings), the chat youâre using might be routed to a different agent with a different workspace, so youâd be grepping the wrong directory.
Run:
openclaw agents list
openclaw agents bindings
If you see another agent/workspace, grep that workspace for MEMTEST-123.
Quick next test (should work if you do it in a DM)
- DM your bot: âWrite
MEMTEST-123into memory now.â - Then run:
grep -R "MEMTEST-123" -n /home/avipe/.openclaw/workspace 2>/dev/null
If that still shows nothing even from a DM, next step is weâll check whether your current model/provider is actually doing tool calls (since memory writes require file tool use) â but letâs first confirm DM vs group + agent bindings.
$ openclaw agents list
Agents:
- main (default)
Identity: đ§ Majordomo (IDENTITY.md)
Workspace: ~/.openclaw/workspace
Agent dir: ~/.openclaw/agents/main/agent
Model: ntth/global.anthropic.claude-opus-4-6-v1
Routing rules: 0
Routing: default (no explicit rules)
Routing rules map channel/account/peer to an agent. Use --bindings for full rules.
Channel status reflects local config/creds. For live health: openclaw channels status --probe.
$ openclaw agents bindings
No routing bindings.
Great â that confirms thereâs only one agent/workspace in play, so this isnât a âwrong agentâ issue.
At this point itâs almost certainly session context:
Key detail: MEMORY.md is only used in the main private session
From the docs, MEMORY.md is only loaded in the main, private session (and never in group/channel contexts). So if youâre chatting via a Discord channel/thread, webhook, or a non-main web UI session key, OpenClaw will not load that file â and your bot will âforgetâ even though the file exists.
Can you paste your session keys?
This will show what session(s) youâre actually chatting in:
openclaw sessions --active 10080
# or:
openclaw sessions --json
Youâre looking for whether you have a session like:
agent:main:mainâ this is the âmain private sessionâ (MEMORY.md applies)
vs things like:agent:main:discord:.../agent:main:webchat:.../agent:main:hook:...â MEMORY.md does not apply
What to do once we confirm
- If you want durable long-term memory: chat in the main private session (
agent:main:main) â e.g. DM-style usage. - If you must use a channel/thread: have it write to
memory/YYYY-MM-DD.mdand/or use a separate agent/workspace for that channel (so notes donât mix).
If you paste the openclaw sessions output, I can tell you immediately which bucket youâre in and what to switch to.
I'm interacting with the agent via the webchat agent:main:main session exclusively.
$ openclaw sessions --activ
e 10080
direct agent:main:main 52m ago global.anthropic.claude-opus-4-6-v1 unknown/200k (?%) system id:fcc6a2c1-b314-49e5-a444-0eb33a7ea789
direct agent:main:cron:...3403ff 2d ago global.anthropic.claude-opus-4-6-v1 unknown/200k (?%) system id:5d428aa7-ec44-41eb-a788-df8814534fd8
direct agent:main:cron:...534fd8 2d ago global.anthropic.claude-opus-4-6-v1 unknown/200k (?%) system id:5d428aa7-ec44-41eb-a788-df8814534fd8
group agent:main:whats...6@g.us 3d ago gemini-3-flash-preview 16k/1049k (2%) system id:79d263b6-a65b-45b6-9771-2f9bacfe43bc
direct agent:main:cron:...90594f 3d ago gemini-3-flash-preview 13k/1049k (1%) system id:15415def-ccba-48c9-9f9a-12111d90594f
group agent:main:whats...8@g.us 4d ago global.anthropic.claude-opus-4-6-v1 unknown/200k (?%) id:be43c1fc-95b5-4a0c-af7f-82bc62c4c29a
direct agent:main:cron:...c88f9c 6d ago global.anthropic.claude-opus-4-6-v1 unknown/200k (?%) system id:482951a0-95dd-43fc-b835-7cce6eb9dcf5
direct agent:main:cron:...bc822a 6d ago global.anthropic.claude-opus-4-6-v1 unknown/200k (?%) system id:9c8dabce-ac4a-4a1e-a821-7a4a759ab7eb
Perfect â since youâre actually in agent:main:main, MEMORY.md should be in play. So the âgroup contextâ explanation is out.
Given everything else youâve shown (workspace writable, no perms errors), the most likely root cause is: your tool policy doesnât allow filesystem tools, so the agent literally canât write/edit MEMORY.md even when it says it will.
In 2026.3.x thereâs a relevant default:
tools.profile: "messaging"(common onboarding default) does NOT includegroup:fs, so noread/write/editâ no persistent memory writes.
1) Confirm your tool profile / allowlist
Run:
openclaw config get tools.profile
openclaw config get tools.allow
openclaw config get tools.deny
2) Fix: allow filesystem tools (minimum needed for memory persistence)
If you want the smallest change that enables memory writes:
openclaw config set tools.allow '["group:fs"]' --strict-json
(Optional but useful for recall tooling too:)
openclaw config set tools.allow '["group:fs","group:memory"]' --strict-json
If youâd rather just unrestrict everything (simplest, but broadest):
openclaw config set tools.profile "full"
3) Restart the gateway + re-test
openclaw gateway restart
Then ask the bot (in your webchat agent:main:main session):
âWrite
MEMTEST-123to MEMORY.md now.â
And verify:
grep -n "MEMTEST-123" /home/avipe/.openclaw/workspace/MEMORY.md
If you paste the tools.profile/allow/deny outputs, I can tell you exactly which config change is the cleanest for your setup (local-only vs exposed).
That output looks normal đ
In OpenClaw, ALL your direct chats with an agent share one âmainâ session key:
agent:main:main
- Your webchat is that
direct agent:main:mainline. - The
agent:main:whats...lines are separate WhatsApp group sessions. - The
agent:main:cron:...ones are background cron jobs.
Docs if you want to go deeper:
Session basics:
https://docs.openclaw.ai/concepts/session
CLI openclaw sessions:
https://docs.openclaw.ai/cli/sessions
Session tools / listing / history:
https://docs.openclaw.ai/concepts/session-tool
Yep, agreed â the session list itself looks totally normal (and since youâre in agent:main:main, MEMORY.md should be the right place).
So weâre back to: the agent likely canât use filesystem tools (read/write/edit), which is what actually persists memory to disk.
In 2026.3.x local installs often default to tools.profile: "messaging" unless youâve changed it â and that profile does not include group:fs, so the model canât update MEMORY.md.
Can you paste these 3 config values?
openclaw config get tools.profile
openclaw config get tools.allow
openclaw config get tools.deny
If tools.profile is "messaging" (common), fix is:
Add filesystem tools to the allowed set:
openclaw config set tools.allow '["group:fs"]' --strict-json
openclaw gateway restart
Then re-run your test (ask it to write MEMTEST-123 to MEMORY.md and grep for it).
If you already have a tools.allow list, donât overwrite it blindly â paste the current value and Iâll tell you the exact merged array to set.
This is a toolsâsurface issue, not sessions.
In 2026.3.x local installs often default to:
tools.profile = "messaging"
which does not include filesystem tools (group:fs), so the agent literally canât touch MEMORY.md even though youâre in agent:main:main.
Ask OpenClaw what itâs doing:
openclaw config get tools.profile
openclaw config get tools.allow
openclaw config get tools.deny
If tools.profile comes back as "messaging" and youâre OK giving it file access, expand the allowlist to include filesystem tools:
openclaw config set tools.allow '["group:fs"]' --strict-json
openclaw gateway restart
Then test from webchat:
âWrite a line MEMTEST-123 into MEMORY.md and tell me the filename + path you used.â
On disk, grep for it:
grep -R "MEMTEST-123" .
If they already have a nonâempty tools.allow, donât overwrite it; paste the current JSON and weâll build the merged array. Docs for what tools.profile, tools.allow, group:fs, etc. actually mean:
https://docs.openclaw.ai/tools
https://docs.openclaw.ai/concepts/memory
+1 to this.
One extra thing that may âclickâ with your original confusion: if youâve never created ~/.openclaw/openclaw.json, youâll have no config file at all (thatâs fine â defaults apply). As soon as you run openclaw config set ..., it will create ~/.openclaw/openclaw.json for you, and then you can see/backup/edit it.
So yeah: check tools.profile/allow/deny first â if itâs the default "messaging" profile, adding group:fs is exactly what enables persistence to MEMORY.md.
running the command "openclaw config set tools.allow '["group:fs"]' --strict-json" seems to have fixed the issue. I did not even have a tools.allow declaration in my openclaw.json file (nor deny/profile for that matter). Why would it be missing altogether? Did I do something wrong during setup? Did something change with a new version? I'm worried theres other stuff missing that'll cause me a headache in the futrue
You didnât do anything wrong â this is normal, and it is tied to newer behavior.
Why those keys were âmissingâ
~/.openclaw/openclaw.json is not a fully-generated config dump. Itâs intentionally just an override file (a patch). Anything you donât set is pulled from built-in defaults.
So âmissing altogetherâ usually just means: you never overrode the default, not that setup failed.
You can always see the effective value (even if itâs not in the file) via:
openclaw config get tools.profile
openclaw config get tools.allow
openclaw config get tools.deny
Why it broke memory persistence specifically
In 2026.3.x, OpenClaw introduced tool âprofilesâ, and local onboarding/defaults commonly resolve to:
tools.profile = "messaging"
That profile does not include filesystem tools (group:fs), so the agent canât read/write/edit workspace files â which includes writing to MEMORY.md.
Thatâs why adding:
openclaw config set tools.allow '["group:fs"]' --strict-json
immediately fixed it.
(Reference: tool profiles + groups are documented in the config reference under âToolsâ: https://docs.openclaw.ai/gateway/configuration-reference )
âAm I missing other stuff thatâll bite me later?â
Probably not â but here are the two quick sanity checks I recommend:
openclaw config validate
openclaw models status
If those are clean, youâre in good shape. From there you generally only add config when you want to change behavior.
Glad you found the root cause. If this solved it, please mark the solution message so Answer Overflow indexes it (rightâclick message â Apps â â Mark Solution).