#Env variables in isolated environment

1 messages · Page 1 of 1 (latest)

cedar junco
#

I have multiple agents set up with discord server and bots all using the same gateway.
I have different channels for buisnesses and threads for projects.

I created a shopify skill to handle the integration with shopiify.

I have set some env variables for the authentication in .openclaw/.env

When i try to use the skill in another thread it says that it cannot run it since it is an isolated environment

vale bayBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

dense pikeBOT
#

Yep — this is a common gotcha in multi-agent + thread setups.

What’s happening is usually one (or both) of these:

  1. Different thread → different agent/workspace
    If your Shopify skill is in <workspace>/skills, it only exists for that agent’s workspace.

  2. Thread session is sandboxed (isolated)
    In many configs, thread/group sessions are “non-main” and run in Docker sandbox.
    In that mode, ~/.openclaw/.env and skills.entries.*.env are host-only and do not reach the sandbox.


Fix options

  • Share the skill across agents: put it in ~/.openclaw/skills/<skill-name>/SKILL.md (shared), not only one workspace.
  • If keeping sandbox on: pass Shopify env vars via sandbox env:
#
{
agents: {
defaults: {
sandbox: {
docker: {
env: {
SHOPIFY_API_KEY: "...",
SHOPIFY_API_SECRET: "...",
SHOPIFY_ACCESS_TOKEN: "...",
SHOPIFY_SHOP: "your-shop.myshopify.com"
}
}
}
}
}
#
}
  • Or disable sandbox for that specific agent (less isolated) with agents.list[].sandbox.mode: "off".

Then restart gateway + start a new session/thread so skill snapshot refreshes.


Can you paste these so we can pinpoint exactly which case you’re in?

openclaw --version
openclaw agents list --bindings
openclaw sandbox explain
cedar junco
#

Also i asked my agent to create a skill. It seems like it created python class. What is a skill really and how are they reused?

dense pikeBOT
#

Great question. Your agent creating a Python class is basically the wrong abstraction for OpenClaw skills.

A skill in OpenClaw is usually:

  • a folder
  • with a required SKILL.md file (frontmatter + instructions)
  • and optional helper files (scripts/, references/, assets/)

So: skills are prompt/workflow packages, not Python classes/plugins by default.


For your two issues:

1) “isolated environment” in another thread

That’s usually sandbox behavior.

#
  • ~/.openclaw/.env is loaded on the host
  • but sandboxed thread runs happen in Docker and don’t inherit host env
  • so Shopify creds must be passed via agents.defaults.sandbox.docker.env (or per-agent override)

Also, if thread routes to a different agent, remember:

  • <workspace>/skills = per-agent
  • ~/.openclaw/skills = shared across agents

2) How skills are reused

Reuse depends on where you place them:

  • Per-agent only: <that-agent-workspace>/skills/shopify/
  • Shared for all agents: ~/.openclaw/skills/shopify/
  • Shared external pack: skills.load.extraDirs