test: warn on shared agent dirs

This commit is contained in:
Shakker
2026-05-12 19:06:20 +01:00
parent c22ea053d1
commit ce6ba9a263

View File

@@ -18,8 +18,19 @@ describe("multi-agent agentDir validation", () => {
});
expect(res.ok).toBe(false);
if (!res.ok) {
expect(res.issues.map((issue) => issue.path)).toContain("agents.list");
expect(res.issues[0]?.message).toContain("Duplicate agentDir");
expect(res.issues).toEqual([
{
path: "agents.list",
message: `Duplicate agentDir detected (multi-agent config).
Each agent must have a unique agentDir; sharing it causes auth/session state collisions and token invalidation.
Conflicts:
- ${shared}: "a", "b"
Fix: remove the shared agents.list[].agentDir override (or give each agent its own directory).
If you want to share credentials, copy auth-profiles.json instead of sharing the entire agentDir.`,
},
]);
}
});