Skip to content

[BUG] LLM Workspace Path Mismatch Causes Access Errors in Multi-Tenant Setup #46

@lehuubao1810

Description

@lehuubao1810

The LLM detects the workspace path as:

~/.goclaw/workspace

However, the tools enforce a tenant-specific path:

~/.goclaw/workspace/6179755304/

Because of this mismatch, any file path generated by the LLM points to the root workspace directory instead of the enforced tenant subdirectory. As a result, all file operations fail with errors such as:

  • access denied
  • no such file or directory

Steps to Reproduce

  1. LLM generates a file path under ~/.goclaw/workspace.
  2. Tooling attempts to access files only within ~/.goclaw/workspace/<tenant_id>/.
  3. File operations fail due to path mismatch.

Expected Behavior

The LLM should be aware of and operate within the enforced tenant-specific workspace directory, e.g.:

~/.goclaw/workspace/<tenant_id>/

Suggested Fix

  • Align the LLM workspace configuration with the enforced multi-tenant directory structure.
  • Dynamically inject the tenant-specific workspace path into the LLM context.
  • Ensure all file operations are constrained to the correct tenant directory.

Additional Context

This issue impacts multi-tenant support and prevents correct file access when running in tenant-isolated environments. Adjusting the workspace resolution logic will improve multi-tenant reliability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions