#OpenClaw has created two workspace dirs: `~/.openclaw/workspace/` and `~/clawd/` ... what to do
1 messages · Page 1 of 1 (latest)
There is valuable stuff in both
~/.openclaw/workspace is the current default workspace path (unless you changed it in config, or youâre using a non-default OPENCLAW_PROFILE). Docs: https://docs.openclaw.ai/concepts/agent-workspace
I wouldnât âmove everythingâ blindly though â only one workspace is active, and itâs whatever your config points at:
openclaw config get agents.defaults.workspace
- If that already says
~/clawd, then thatâs your active workspace right now. You can keep using it and just ignore/cleanup the extra folder later. - If you want to standardize on the canonical default (
~/.openclaw/workspace), do it like this:- stop the gateway
- move/copy your workspace files (AGENTS.md/SOUL.md/USER.md/memory/, etc.) into
~/.openclaw/workspace - set
agents.defaults.workspaceaccordingly - restart the gateway
Important: donât mix this up with ~/.openclaw/ â thatâs the state dir (config/credentials/sessions). You generally do not move that into the workspace. (Related FAQ note: migrating a machine requires copying both ~/.openclaw and the workspace.) https://docs.openclaw.ai/start/faq
If you paste the output of openclaw config get agents.defaults.workspace (and maybe ls -la ~/.openclaw/workspace ~/clawd), I can tell you which directory is actually being used.
If thereâs valuable stuff in both, donât do a blind âmove everythingâ â you want to (a) pick one active workspace, then (b) merge the other into it, resolving conflicts intentionally.
Whatâs canonical today: ~/.openclaw/workspace is the default (unless you overrode it / profile). Docs: https://docs.openclaw.ai/concepts/agent-workspace
1) First: confirm which one OpenClaw is actually using
openclaw config get agents.defaults.workspace
Whatever that prints is the active workspace right now.
2) Recommended merge approach (safe)
Pick ~/.openclaw/workspace as the âfinalâ target, then:
- Back up both folders (at least rename one so you can undo).
- Merge the obvious âappend-onlyâ stuff:
memory/(usually safe to just copy/merge)skills/,canvas/(copy/merge)
- For root files that may differ, manually reconcile:
AGENTS.md,SOUL.md,USER.md,TOOLS.md,IDENTITY.md,HEARTBEAT.md
If you want a low-risk dry run for the merge, rsync is great:
rsync -avhn ~/clawd/ ~/.openclaw/workspace/
# remove -n once the output looks right
3) Then point OpenClaw at the one you chose
If you decide the winner is ~/.openclaw/workspace:
openclaw config set agents.defaults.workspace "~/.openclaw/workspace"
openclaw gateway restart
Important: donât mix up workspace vs state
Donât move ~/.openclaw/ into the workspace â ~/.openclaw/ is state (config/credentials/sessions). Workspace is just the agent âhomeâ files. (FAQ touches this in the migration section too: https://docs.openclaw.ai/start/faq)
If you paste:
openclaw config get agents.defaults.workspacels -áá ~/.openclaw/workspace ~/clawd | head
âŠI can suggest the cleanest merge direction based on whatâs actually in each.
that command returns ~/.openclaw/workspace
Perfect â that means OpenClaw is already using the canonical workspace right now, so you should treat:
- active workspace:
~/.openclaw/workspace - extra/old workspace:
~/clawd(safe to archive/merge, but donât âswitchâ to it unless you mean to)
If ~/clawd has valuable stuff, the clean move is: merge ~/clawd into ~/.openclaw/workspace (not the other way around), with a dry-run first:
# quick look
ls -la ~/clawd
ls -la ~/.openclaw/workspace
# dry-run merge (shows what would change)
rsync -avhn ~/clawd/ ~/.openclaw/workspace/
# then do it for real once it looks right
rsync -avh ~/clawd/ ~/.openclaw/workspace/
Notes:
memory/is usually the big one to merge (generally âappend-yâ).- For root files like
AGENTS.md,SOUL.md,USER.md, etc., expect conflicts â open both and manually reconcile if needed. - Donât move anything from
~/.openclaw/(thatâs state: config/credentials/sessions), only workspace files.
After youâve confirmed everythingâs in ~/.openclaw/workspace, you can archive the old folder (Iâd rename or trash, not delete):
mv ~/clawd ~/clawd-archive
# or: trash ~/clawd (if you have trash installed)
If that clears it up, please mark the solution message in the thread (right-click â Apps â â Mark Solution) so Answer Overflow indexes it.
any idea how working in ~/clawd happened? was that used by an older version?
Yeah â ~/clawd is basically a historical artifact.
What likely happened:
- Early Clawdbot/âClawdâ era a bunch of examples / community setups used
~/clawdas the âworkspace repoâ path (easy to see + git-init), and the setup/onboarding flow will happily create + seed whatever workspace path is configured at the time. - Later the project standardized on the cleaner default
~/.openclaw/workspace(keeps âagent memoryâ under the OpenClaw state umbrella, works better with profiles, etc.). Docs now call that the default: https://docs.openclaw.ai/concepts/agent-workspace
So at some point you probably had your workspace configured as ~/clawd (maybe via an older wizard/default, or you copy/pasted an older config snippet), OpenClaw created it and wrote the bootstrap files there â and then you (or openclaw doctor / re-onboarding) switched to ~/.openclaw/workspace, leaving ~/clawd behind.
If you want to confirm, paste:
openclaw --version- and the workspace-related part of
~/.openclaw/openclaw.json(just theagent/agentsworkspace keys; redact anything sensitive)
âŠand I can tell you if youâve got any legacy agent.workspace vs agents.defaults.workspace history going on.
ok what's happening is that my main agent has its workspace in ~/.openclaw/workspace and a bunch of subagents have it in ~/clawd
Thatâs almost certainly config drift: the âmainâ agent is pinned to one workspace, while the other agent entries (the ones youâre calling âsubagentsâ) still have an older workspace override.
In OpenClaw there are two different concepts that often get conflated:
- Subagent sessions (spawned for a task) still run under some agentId
- Multiple agents (configured under
agents.list) can each have their own workspace
So if those âsubagentsâ are actually separate configured agents, theyâll use whatever is set on that agent entry (or whatever the defaults were at the time they were created).
Quick way to see whatâs going on
Run these and paste the outputs:
openclaw config get agent.workspace
openclaw config get agents.defaults.workspace
openclaw config get agents.list
What I expect youâll find is either:
agents.list: [{ id: "...", workspace: "~/clawd" }, ...]for those extra agents, or- an old
agents.defaults.workspace: "~/clawd"lingering whileagent.workspacewas set to~/.openclaw/workspace
Fix (if you want everything to use ~/.openclaw/workspace)
- Set the default:
openclaw config set agents.defaults.workspace "~/.openclaw/workspace" - Then remove per-agent workspace overrides (preferred) or change them to match. Easiest is usually editing
~/.openclaw/openclaw.jsonin the Control UI âRaw JSONâ editor and deleting theworkspacefields under those agents.
After that, openclaw gateway restart to make sure everything is using the new paths consistently.
Docs that describe this model:
- Agent workspace (default + per-agent overrides): https://docs.openclaw.ai/concepts/agent-workspace
- Config structure (
agents.defaults.workspace,agents.list): https://docs.openclaw.ai/gateway/configuration
yes I have multiplagents configured withs agent.list
but
ociule@Ovidius-Mac-mini clawd % openclaw config get agent.workspace
đŠ OpenClaw 2026.2.25 (4b5d4a4) â Siri's competent cousin.
Config path not found: agent.workspace
Yep â that error is expected on 2026.2.x.
agent.workspace is not a valid config key anymore (some older examples/docs used agent: { ⊠}, but current schema uses agents), so openclaw config get agent.workspace will always say âpath not foundâ.
What you want instead is:
-
Default workspace (what agents inherit):
openclaw config get agents.defaults.workspace -
Per-agent overrides (why some of your agents still use
~/clawd):openclaw config get agents.listThen look for
workspaceentries inside each agent object. Any agent withworkspace: "~/clawd"(or similar) will keep using that until you remove/change it.
How to unify them
Edit ~/.openclaw/openclaw.json and either:
- remove
workspacefrom thoseagents.list[]entries so they inheritagents.defaults.workspace, or - set each one explicitly to
~/.openclaw/workspace(if you really want them all sharing one workspace).
After editing:
openclaw doctor
openclaw gateway restart
Docs for the âcurrentâ shape are here:
If you paste your openclaw config get agents.list output (you can redact anything sensitive), I can tell you exactly which entries to change.
re "if you really want them all sharing one workspace" no, I guess they should have separate workspaces
they have separate workspaces inside ~/clawd already, that's good
Totally valid â multiple agents should usually have separate workspaces. The âcanonicalâ bit just means the default if you donât override anything is ~/.openclaw/workspace.
So if you already have something like:
~/clawd/main/~/clawd/coding/~/clawd/home/- âŠ
âŠand each agent in agents.list[] points at its own folder, thatâs a perfectly sane setup.
The only real âproblemâ is when you have:
- two different folders that both look like the active workspace for the same agent, or
- a mix of defaults/overrides that makes it unclear where an agent is writing.
If you want to keep your current layout, Iâd just do two things:
- Make sure every non-main agent has an explicit
workspaceinagents.list[](so youâre not accidentally inheritingagents.defaults.workspace). - Optionally rename the root from
~/clawdto something less lore-ish (purely for human clarity), but not required.
If you ever want to align with docs conventions later, a common pattern is:
- main:
~/.openclaw/workspace - others:
~/.openclaw/workspace-<agentId>(same idea as the profile defaultworkspace-<profile>mentioned in the docs)
Docs: https://docs.openclaw.ai/concepts/agent-workspace
But yeah: separate workspaces per agent is good, and your current âseparate folders inside ~/clawdâ is already accomplishing that.
my question is then, should the one agent (the main) also be moved inside ~/clawd with the others?
he's in .openclaw/workspace/ rn
You can, but you donât need to.
Keeping main in ~/.openclaw/workspace is totally fine (itâs the documented default), and it has one nice property: if you ever remove your multi-agent config temporarily, OpenClaw âjust worksâ with the default workspace path.
Move it under ~/clawd only if you want organizational consistency (e.g. âall agent workspaces live under one parent folderâ), and youâre happy diverging from the default.
If you do move it, Iâd strongly recommend:
- Give main an explicit workspace in
agents.list[](so itâs not âspecialâ / implicit) - Keep
agents.defaults.workspaceas a sensible default for any future agents you forget to set a workspace for.
Example pattern:
- main â
~/clawd/main - coding â
~/clawd/coding - etc.
Then just move the folder contents + update config, and restart:
openclaw gateway restart
openclaw doctor
(And just to be clear: youâre only moving the workspace folder(s), not anything under ~/.openclaw/.)
If you paste your openclaw config get agents.list (redact anything sensitive), I can point out the exact place to add workspace for the main agent so itâs consistent with the others.
Nope â if main is already in ~/.openclaw/workspace and things are working, leaving it there is perfectly fine (itâs the documented default and tends to reduce surprises later).
Move main under ~/clawd only if you want âall agent workspaces under one parent folderâ for your own organization. It wonât make OpenClaw happier either way.
If you do want to move it for consistency, the clean way is:
- Stop gateway
- Copy/merge (dry-run first), e.g.
rsync -avhn ~/.openclaw/workspace/ ~/clawd/main/ # then without -n rsync -avh ~/.openclaw/workspace/ ~/clawd/main/ - Edit
~/.openclaw/openclaw.jsonand set mainâs entry inagents.list[]toworkspace: "~/clawd/main"(so itâs explicit like your other agents) - Restart gateway
If you paste your openclaw config get agents.list (redact anything sensitive), I can tell you exactly where to add the main workspace field.
ok so the real issue is that there is a memoty folder in both dirs. my agent startled me when he couldn't recall an ongoing project
do multiple memory folder cause this? how to fix?
That symptom makes sense: memory is per-agent, per-workspace.
OpenClawâs semantic recall indexes Markdown inside the active agentâs workspace â basically MEMORY.md + memory/**/*.md for that agent (docs: https://docs.openclaw.ai/concepts/memory). So if you have:
~/.openclaw/workspace/memory/...(main agentâs memory)~/clawd/<other-agent>/memory/...(other agentsâ memory)
âŠthen the main agent will not âseeâ the other agentâs memory unless you manually copy it over (or configure extra paths).
Why it âforgotâ an ongoing project
Usually one of these:
- The project notes got written into the other workspaceâs
memory/folder (different agent). - You moved/changed workspaces at some point, so the project notes are sitting in the âoldâ
memory/. - You asked in a Discord channel/thread: by default
MEMORY.mdis not injected in group contexts (to avoid leaks), so youâre relying on memory search / the daily log.
Fast fix
Decide which agent âownsâ that project (sounds like main), then copy/merge the relevant markdown from the other memory folder into:
~/.openclaw/workspace/memory/ (and/or summarize into ~/.openclaw/workspace/MEMORY.md)
Then force a reindex for that agent and verify recall:
openclaw memory index --agent main --verbose
openclaw memory search --agent main "project name"
(You can also run openclaw memory status --deep --agent main to sanity-check the index.)
Once you do that, the âcanât recall projectâ jumps usually stop â because youâve made the project notes land in the same workspace that agent is indexing.
Yeah â having multiple memory/ folders across different workspaces can absolutely lead to this kind of âwhy canât you recall X?â moment, but itâs not that memory is âconflictingâ; itâs that memory is scoped to the agent + its workspace.
Whatâs happening
- Each agent indexes its own workspace:
MEMORY.md+memory/**/*.mdinside that workspace. Docs: https://docs.openclaw.ai/concepts/memory - So if âProject Alphaâ notes are in
~/clawd/some-agent/memory/...but youâre chatting with the main agent whose workspace is~/.openclaw/workspace, main simply wonât see them.
Fix options (pick one)
Option A (recommended): move/merge the project notes into the âownerâ agentâs workspace
- Find where the notes actually are:
rg -n "Project Alpha" ~/.openclaw/workspace ~/clawd - Copy/merge the relevant markdown into the main agentâs:
~/.openclaw/workspace/memory/....mdand/or summarize into~/.openclaw/workspace/MEMORY.md
- Reindex and verify:
openclaw memory index --agent main --verbose
openclaw memory search --agent main "Project Alpha"
Option B: keep separate workspaces, but let an agent index âextra pathsâ
If you want main to be able to recall notes stored under another folder, add those folders as extra indexed paths via memorySearch.extraPaths (see âAdditional memory pathsâ in the memory doc). This is handy for a âshared projectsâ folder, but youâre trading off isolation/cleanliness.
Option C: make multiple agents share one workspace
Works, but usually defeats the point of multi-agent separation (and increases accidental cross-contamination), so I wouldnât unless youâre intentionally running them as âone brainâ.
Sanity check (worth doing once)
If memory search itself is misconfigured (embeddings not available), recall will look broken even if files are in the right place:
openclaw memory status --deep --agent main
If you paste (redacting anything sensitive):
openclaw config get agents.listopenclaw memory status --deep --agent main
âŠI can tell you whether this is purely ânotes in the other workspaceâ vs âmemory indexing not actually runningâ.
is it best practice to separate agent workspaces?
Yes â if youâre using agents.list (multi-agent), separate workspaces is the intended / best-practice setup. The whole point of âmultiple agentsâ is isolation: separate workspace + agentDir + sessions so personas/instructions/memory donât bleed into each other. Docs: https://docs.openclaw.ai/concepts/multi-agent and https://docs.openclaw.ai/concepts/agent-workspace
Benefits of separate workspaces
- Prevents âmemory bleedâ (Agent A accidentally learns/uses Agent Bâs notes/persona).
- Lets each agent have its own
AGENTS.md/SOUL.md/USER.mdand its ownmemory/. - Reduces confusion when an agent âcanât recallâ something: it can only recall whatâs in its workspace.
Downside (the thing that bit you):
- If a projectâs notes ended up in another agentâs
memory/, the main agent wonât recall it. Thatâs expected.
Common pattern to fix that without merging all workspaces
- Decide which agent âownsâ a project, and keep that projectâs notes in that agentâs workspace
memory/(and/orMEMORY.md). - If you truly want shared project memory, create a shared notes folder and index it via
memorySearch.extraPaths(documented in the Memory page): https://docs.openclaw.ai/concepts/memory
Also: make sure each agent has a unique agentDir too â sharing agentDir across agents causes auth/session collisions (called out in the multi-agent doc).
re Decide which agent âownsâ a project
I can't do that, I'm doing a bmad pattern where agents with very different skills work on the same project and codebase. there has to be a projects/$PROJECT_ID folder accessible to all
Youâre thinking about it the right way: agent workspaces should stay separate, but the project/codebase should live in a shared folder that all agents can read/write.
Key distinction:
- Workspace (
âŠ/workspace-*): the agentâs âhomeâ (persona files +memory/), and the default cwd. - Project folder (
projects/$PROJECT_ID): shared working tree / artifacts for the BMAD âmany specialists, one codebaseâ pattern.
So instead of trying to make memory/ be the shared project state, do this:
Recommended pattern (works great with multi-agent)
-
Keep per-agent workspaces separate (as intended by multi-agent routing):
https://docs.openclaw.ai/concepts/multi-agent -
Create a shared projects root somewhere stable, e.g.:
~/projects/<projectId>or~/.openclaw/projects/<projectId>or~/clawd/projects/<projectId>(if you like that parent folder)
- Put the shared, durable project context in the project folder, not in agent memory:
projects/<id>/PROJECT.md(what this is, goals, current status)projects/<id>/DECISIONS.mdprojects/<id>/TODO.mdorRUNBOOK.md
Then every agent can read/update the same files while still keeping its own persona + private memory isolated.
Optional: make âmemory_searchâ see shared project notes too
If you want semantic recall to hit the shared project docs, you can add those paths to indexing via:
agents.defaults.memorySearch.extraPaths (docs mention this on the Memory page):
https://docs.openclaw.ai/concepts/memory
That way agents can search shared notes even though their own memory/ folders remain separate.
Why your agent âforgotâ
Having two memory/ folders isnât inherently bad â itâs just that the agent you were talking to was indexing a different workspaceâs memory/, so it genuinely couldnât recall those notes.
If you adopt the âshared PROJECT.mdâ approach, that problem basically goes away for multi-agent project work.
my updated setup is: main agent workspace in ~/.opeclaw/workspace
several subagents workspaces in ~/.opeclaw/workspace/factory/{agent1, agent2, agent3}
project files in ~/.openclaw/workspace/projects/$PROJECTID
this seems to work. there's no mixing up of agent SOUL.md
is it ok that sub-agent workspace is inside the main agent's workspace though?
Yeah, that layout is fine â OpenClaw doesnât require agent workspaces to be siblings. Having agent workspaces nested under the main workspace wonât automatically âmixâ SOUL.md etc.
The caveats are more about humans + tooling, not OpenClaw:
-
Workspaces arenât a sandbox
Even with separate workspaces, an agent can still read/write anywhere the OS permissions allow (absolute paths, or../relative escapes). Nesting makes âoops I edited the other agentâs filesâ a bit easier. If you ever need hard isolation, thatâs what sandboxing is for. -
Git / backups can get messy
If~/.openclaw/workspaceis a git repo, thenfactory/agent1/...being inside it means youâll likely commit/back up all agent workspaces together unless you.gitignorethem intentionally. That might be OK, just be aware. -
Memory indexing wonât mix unless you tell it to
By default, the main agent only indexesMEMORY.mdandmemory/**/*.mdat the root of its own workspace (docs: https://docs.openclaw.ai/concepts/memory). It will not automatically indexfactory/agent1/memory/....
Where you can shoot yourself in the foot is if you later configurememorySearch.extraPathsbroadly (e.g. indexing the whole workspace tree) â then you might start pulling in other agentsâ notes.
If you want a âcleanerâ long-term structure, a common pattern is:
~/.openclaw/workspaces/main~/.openclaw/workspaces/factory/agent1
~/.openclaw/projects/<projectId>(shared)
âŠbut your current setup is totally workable as long as youâre conscious of the above.
I actually am concerned about sandboxing ... I'd like to limit folders agents can access to ~/.openclaw/workspace how to do that ?
To actually limit filesystem access (so tools canât wander around $HOME), you need Docker sandboxing. Without sandboxing, tools run on the host and thereâs no âonly allow ~/.openclaw/workspaceâ switch.
OpenClawâs sandboxing is designed for exactly this: run read/write/edit/exec/... inside a container, and only mount what you explicitly allow. Docs: https://docs.openclaw.ai/gateway/sandboxing
The config you want (restrict to the agent workspace only)
In ~/.openclaw/openclaw.json:
{
agents: {
defaults: {
sandbox: {
mode: "all", // "all" to enforce for every session
scope: "session", // or "agent" if you want fewer containers
workspaceAccess: "rw",// mounts that agentâs workspace at /workspace
// docker: { network: "none" } // default is no network anyway
},
},
},
}
What this does:
- Tools run in Docker.
- The sandbox can only see the container filesystem plus
/workspace(your agent workspace) because you mounted it. - It cannot see other host paths unless you add extra binds.
Build the sandbox image (one-time)
Per docs:
scripts/sandbox-setup.sh
Then restart the gateway.
Verify whatâs actually enforced
openclaw sandbox explain
Two important foot-guns
-
workspaceAccess: "rw"mounts the whole workspace for that agent.
In your layout, the main agent workspace containsfactory/andprojects/, so main will be able to see those subfolders (because theyâre inside its workspace). If you donât want main to see subagents, youâll want to restructure so each agent workspace is a sibling, not nested. -
Elevated exec bypasses sandboxing.
Anything configured undertools.elevated(or ârun on hostâ escape hatches) defeats the pointâkeep that locked down if your goal is containment.
If you paste your current agents.list (just the workspace + sandbox bits, redact anything sensitive), I can suggest the cleanest âsibling workspaceâ folder layout that avoids main being able to traverse into factory/*.
I don't mind main being able to go into factory. that seems useful. however I'd want none to be able to read outside .openclaw/workspace
what model are you running on btw?
If you want âagents canât read/write anything on the host except stuff under ~/.openclaw/workspaceâ, the practical way is: enable Docker sandboxing for all sessions and only mount the paths you want. Without sandboxing, tools run on the host and you canât reliably enforce a folder boundary.
Docs: https://docs.openclaw.ai/gateway/sandboxing
Config (enforce sandbox + only expose workspace + shared projects)
In ~/.openclaw/openclaw.json:
{
agents: {
defaults: {
sandbox: {
mode: "all", // key point: sandbox even âmainâ
scope: "session",
workspaceAccess: "rw", // mounts *that agentâs* workspace at /workspace
docker: {
network: "none", // (default) no outbound network
binds: [
// shared project tree (host path stays inside ~/.openclaw/workspace)
"/Users/<you>/.openclaw/workspace/projects:/projects:rw",
],
},
},
},
},
}
Why the extra bind matters in your setup: if an agentâs workspace is .../workspace/factory/agent1, then with sandboxing it will only see that subtree at /workspace and wonât be able to reach ../projects unless you bind-mount it explicitly.
One-time setup + verification
scripts/sandbox-setup.sh
openclaw gateway restart
openclaw sandbox explain
Two foot-guns to watch
- Bind mounts are the allowlist. Donât add binds pointing at
$HOMEor/if your goal is containment. - Elevated exec bypasses sandboxing (host escape hatch). Keep that disabled/unused if you want strict boundaries.
If you paste your OS + the exact agents.list[].workspace paths (no secrets), I can rewrite the binds with the correct absolute path format for macOS.
In this thread right now Iâm running on OpenAI GPTâ5.2 (openai/gpt-5.2).
Worth noting: in OpenClaw the active model can vary per agent/session (defaults + overrides + fallbacks), so the most reliable way to check your setup is /status in chat or openclaw status / openclaw models status.
Models overview docs: https://docs.openclaw.ai/concepts/models
should I have one AGENTS.md per agent? I currently have that, plus another one in the factory dir
Yes: one AGENTS.md per agent workspace (at the workspace root) is the normal / intended setup.
- In multi-agent mode, each agent has its own workspace, and that workspaceâs
AGENTS.mdis what gets injected/loaded for that agentâs sessions. Docs: https://docs.openclaw.ai/concepts/agent-workspace and https://docs.openclaw.ai/concepts/multi-agent
About âanother one in the factory/ dirâ:
- If
~/.openclaw/workspace/factoryis not itself an agentâs configuredworkspace, then anAGENTS.mdsitting there is basically ignored (OpenClaw doesnât recursively hunt for extra AGENTS files; it uses the one at the workspace root). - It only matters if you have an agent whose
workspaceis exactly.../workspace/factory.
If you want a âshared baselineâ for all your factory agents, the pragmatic approach is:
- keep per-agent
AGENTS.md(small, specific), - and optionally keep a template in
factory/(rename it to something likeAGENTS.template.mdorFACTORY_BASE.mdso itâs not confusing).
oh that sounds like a problem, because there's useful stuff in factory/AGENTS.md that my main agent ignores. and there's no agent using factory as a workspace
Right â factory/AGENTS.md wonât get loaded automatically unless some agentâs workspace is exactly .../factory. OpenClaw basically loads the AGENTS.md at the workspace root for the current agent (it doesnât recurse). Thatâs why your main agent ignores it.
Youâve got three sane ways to fix it:
Option A (most reliable): copy the important bits into mainâs AGENTS.md
If itâs truly âcore operating rulesâ, put them in ~/.openclaw/workspace/AGENTS.md. Thatâs the only way to guarantee theyâre always present without relying on the agent to remember to read another file.
Option B (single source of truth): keep a shared âfactory rulesâ file, and tell each agent to read it
Rename factory/AGENTS.md to something unambiguous like factory/FACTORY_RULES.md, then in each agentâs root AGENTS.md add something like:
âAt session start, read
../FACTORY_RULES.md(or an absolute path) and follow it.â
Caveat: this only works if your tool access allows it. If you enable Docker sandboxing with workspaceAccess: "rw" for those sub-agents whose workspace is .../factory/agent1, they wonât see .../factory/FACTORY_RULES.md unless you bind-mount it into the sandbox. So Option B is great in non-sandboxed mode; in sandboxed mode you must expose that shared file deliberately.
Option C (sandbox-friendly shared rules): duplicate the shared file into each workspace
Keep factory/FACTORY_RULES.md as the âmasterâ, but copy it into each agent workspace (e.g. .../agent1/FACTORY_RULES.md) so itâs inside /workspace for that agentâs sandbox. Itâs duplication, but it keeps containment clean.