Skip to content

Project/Context Switching within Workspace #12333

@shreyanshjain7174

Description

@shreyanshjain7174

Problem

Currently, OpenClaw uses a single workspace directory (~/.openclaw/workspace) for all agent context. Developers working on multiple projects need to manually manage context or use separate agent instances.

Proposed Solution

Add the ability to switch between project contexts within the workspace, accessible via:

  • CLI: openclaw workspace switch <project-name>
  • UI: Project switcher in the web interface

Expected Behavior

When switching projects:

  • Load project-specific memory files (memory/<project>/)
  • Switch working directory context
  • Optionally load project-specific PROJECT.md or .project/ config
  • Maintain separate conversation history per project (or shared main session)

Use Cases

  1. Multi-project developers: Switch between ~/jobshot, ~/personal-site, etc.
  2. Client work: Separate contexts for different clients
  3. Experimentation: Sandbox projects without polluting main workspace

Alternatives Considered

  • Running multiple OpenClaw instances (overkill, wastes resources)
  • Symlinking workspace directory (fragile, manual)
  • Using cd in every command (loses context between sessions)

Implementation Ideas

  • Store project configs in ~/.openclaw/projects/
  • Add currentProject to session metadata
  • Project-scoped memory: memory/<project>/YYYY-MM-DD.md
  • Shared globals: SOUL.md, USER.md stay workspace-level

Additional Context

Similar to:

  • tmux sessions
  • VS Code workspace switching
  • pyenv / nvm environment switching

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions