-
-
Notifications
You must be signed in to change notification settings - Fork 80.3k
[Bug]: Multi-Agent Workspace Bootstrap Files Injected from Default Workspace Instead of Per-Agent Workspace #92903
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Type
Fields
No fields configured for issues without a type.
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
Bug: Multi-Agent Workspace Bootstrap Files Injected from Default Workspace Instead of Per-Agent Workspace
环境
OpenClaw 版本: 2026.6.6
Channel: Feishu
复现步骤
在 openclaw.json 中配置多个 agent,每个 agent 指定独立的 workspace:
在非默认 agent 的 workspace 下设置自定义 SOUL.md
通过对应 channel 与该 agent 对话
预期行为
系统提示中的 Project Context 应注入当前 agent 自己的 workspace 文件,例如:
~/.openclaw/workspace_feishu_A1/SOUL.md
/.openclaw/workspace_feishu_A1/AGENTS.md/.openclaw/workspace/)的文件,而非当前 agent 绑定的 workspace 文件。实际行为
系统提示注入的是默认 workspace(
影响
Multi-agent 场景下,每个 agent 的 SOUL.md、AGENTS.md、USER.md、IDENTITY.md 等 bootstrap 文件无法正确生效
Agent 看到的是默认 workspace 的上下文,而非自己 workspace 的配置
即使 binding 正确路由到对应 agent,system prompt 注入的 workspace 文件路径仍然错误
补充说明
agents.list[].workspace 配置本身是生效的(各 workspace 目录确实存在且包含完整的 bootstrap 文件)
问题出在 system prompt 的 Project Context 注入阶段,未根据当前 agent 的 workspace 路径解析文件
重启 gateway 后问题依旧
agents.defaults.contextInjection 为默认值 "always"
Steps to reproduce
Multi-Agent Workspace Bootstrap Files Injected from Default Workspace Instead of Per-Agent Workspace
Expected behavior
预期行为
系统提示中的 Project Context 应注入当前 agent 自己的 workspace 文件,例如:
~/.openclaw/workspace_feishu_A1/SOUL.md
~/.openclaw/workspace_feishu_A1/AGENTS.md
Actual behavior
实际行为
系统提示注入的是默认 workspace(~/.openclaw/workspace/)的文件,而非当前 agent 绑定的 workspace 文件。
影响
Multi-agent 场景下,每个 agent 的 SOUL.md、AGENTS.md、USER.md、IDENTITY.md 等 bootstrap 文件无法正确生效
Agent 看到的是默认 workspace 的上下文,而非自己 workspace 的配置
即使 binding 正确路由到对应 agent,system prompt 注入的 workspace 文件路径仍然错误
OpenClaw version
OpenClaw 2026.6.6 (8c802aa)
Operating system
系统: Windows_NT
Install method
npm全局
Model
mimax
Provider / routing chain
openrouter
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response