Skip to content

Desktop: make workspace selectable per session, not only launch-time cwd #40297

Description

@bagelcode-jhkim

Summary

Hermes Desktop currently supports an initial project directory via:

hermes desktop --cwd <path>

or:

HERMES_DESKTOP_CWD=<path> hermes desktop

That is useful as a startup default, but it does not match the way a long-lived desktop app is used across multiple folders/projects. Selecting a folder in the Desktop side panel can also look like a workspace choice, but it does not reliably make that folder the actual workspace/cwd for new sessions.

Inspired by the Codex app and Claude app, Hermes Desktop should support adding/opening project folders inside the app and creating new sessions bound to those folders.

Current behavior

  • Workspace/cwd can be specified at Desktop launch time with --cwd / HERMES_DESKTOP_CWD.
  • Desktop is a long-lived multi-session app, but the workspace default is effectively process-level or app-level.
  • The file/folder side panel can point at a folder, but that does not clearly become the actual agent workspace for a new session.
  • New sessions do not expose an obvious per-session workspace selection flow.
  • Switching among multiple projects requires relaunching Desktop with a different cwd or relying on ambiguous remembered workspace state.

Expected behavior

Desktop should treat workspace as a per-session property, not only a launch-time/default property.

Suggested UX:

  1. Add an Add Folder / Open Workspace action.
  2. Maintain a list of recent/known workspaces.
  3. From a selected folder, allow New Session in this Workspace.
  4. Persist the selected workspace path on the session.
  5. Resuming that session should restore the same workspace/cwd.
  6. File tools, terminal tools, code execution, and the file browser should operate relative to that session workspace.
  7. Session list/header should show a workspace/project badge or folder name.

Why this matters

The Desktop app is naturally a multi-project interface:

  • multiple simultaneous agent conversations
  • multiple coding/research projects
  • persistent sessions
  • app-level session history
  • workspace file browsing

A launch-time --cwd works for CLI/TUI because one terminal process usually maps to one working directory. Desktop needs a different model: workspace should be attached to the session or conversation, not just to the Electron app launch.

Codex app and Claude app provide a better mental model here: users add/open a folder, then create or resume sessions within that folder's context.

Proposed data model

Each session could store something like:

session.workspace = {
  path: "/Users/example/projects/my-app",
  name: "my-app"
}

or:

session.context = {
  workspace: {
    path: "/Users/example/projects/my-app",
    label: "my-app"
  }
}

This should be used to initialize:

  • terminal cwd
  • file/search/read/write tools
  • code execution workdir
  • file browser root
  • project-specific context loading, e.g. AGENTS.md, CLAUDE.md, .cursorrules, etc.

MVP acceptance criteria

  • Desktop has an Add/Open Folder action.
  • User can create a new session from a selected workspace.
  • Session persists the workspace path.
  • Resuming the session restores the workspace/cwd.
  • Tool calls use the session workspace as their default working directory.
  • Session list or header displays the current workspace/folder.
  • Changing the file browser folder alone is not confused with changing the actual agent workspace, unless explicitly designed to do so.

Nice-to-have follow-ups

  • Workspace-specific recent sessions.
  • Workspace-specific default model/toolset/profile settings.
  • Move/reassign an existing session to a workspace.
  • Open workspace in terminal/Finder.
  • Show a warning when the preview/file browser folder differs from the active agent workspace.

Related issues / distinction

This is related to, but distinct from:

This issue is specifically about the local Desktop UX and session contract: selecting/opening a folder inside Desktop should let the user create a new session whose actual workspace/cwd is that folder.

Current workaround

Current workaround:

hermes desktop --cwd /path/to/project

This only sets the initial/default project directory at app launch and does not support smoothly switching among multiple project workspaces inside the Desktop app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/desktopElectron desktop app (apps/desktop/*)sweeper:implemented-on-mainSweeper: behavior already present on current mainsweeper:risk-session-stateSweeper risk: may lose/corrupt/mis-associate session or context statetype/featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions