You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a configurable default working directory for sessions without a specific project #2322
When starting a session without a specific project, the working directory falls back to the last selected project root, process.cwd(), or the app path — none of which the user controls. Users who don't want tasks landing in a repo root or on the system drive (e.g. C:\ on Windows) have no way to configure a catch-all directory. Real user request: "I keep a general-purpose directory (~/agent) for tasks that have no specific folder, and I want to configure that myself."
Under the hood, createProjectRootController.current() resolves as selected → persisted (lastProjectPathFile) → fallbackRoots([process.cwd(), app.getAppPath()]).
Desired outcome
A "Default working directory" setting under Settings → General, with a system folder picker and a clear/reset action.
Sessions created without an explicit project/folder use this directory as their cwd.
Resolution order: explicit per-session/project selection > configured default working directory > current fallback. The setting persists across restarts and app updates.
No workaround today — you must remember to pick a project each time. Reference implementations:
Hermes Agent (desktop): resolveHermesCwd() — explicit configured dir (a JSON file in userData) > env hint > INIT_CWD > process.cwd() > repo root > home, skipping the install directory; the settings UI has a folder picker with set/clear.
OpenClaw: agents.defaults.workspace in the global config, written by openclaw setup --workspace <path>; OPENCLAW_WORKSPACE_DIR env override; per-agent and per-session overrides.
PawWork (negative example): the default directory is hardcoded (~/PawWork) in three places with no config entry, so tasks silently land there.
Current status and overlap with the existing default Project
This issue was opened before #2446 introduced a first-class default Project under Settings → Projects. The current behavior for a new conversation without an explicit workspace is now:
As a result, the original “no workaround today” statement is no longer fully current: a user can add a general-purpose directory such as ~/agent as a Project and make it the default. New conversations will then start from that directory.
#2998 is therefore not an exact duplicate, but its remaining scope is much narrower than the original issue suggests. It adds a second default location that applies only when the current selection has no Project identity. The existing default Project still wins for ordinary new conversations.
There is also a Bot-specific inconsistency in the current implementation: Bot creation follows the current workspace selection rather than the configured default Project. #2998 addresses only the “no Project” branch by giving it a raw fallback path; it does not make Bots honor the existing default Project.
Before proceeding with #2998, I think we should clarify the intended product behavior:
Is “Ungrouped / No Project, but with a configurable cwd” a distinct capability we intentionally want?
Or is the actual expectation simply that ordinary and Bot conversations should use the existing default Project?
If both a default Project and a default working directory are required, what is their user-visible precedence, and how should the local-only directory behave while a remote Runtime Host is active?
My current recommendation is to treat most of this issue as superseded by #2446. If Bots should follow the configured default, the smaller and more coherent fix would be to make Bot workspace resolution reuse the existing default-Project policy. We should add a second default setting only if keeping conversations ungrouped while assigning them a custom cwd is an explicit product requirement.
This issue has had no human activity for 30 days and has been marked stale. It will be closed in 30 days unless someone comments.
If the issue is still current, please confirm it against the latest main and add any information that would help move it forward. Assigned issues and issues labelled pinned are exempt from this policy.
This is now covered by the default Project added in #2446. resolveDesktopSessionWorkspace() in apps/desktop/src/main/new-session-project.ts consults the configured default project before falling back to the previous selection or process.cwd(), so a general-purpose directory such as ~/agent can be registered as a Project and set as the default, and new conversations start there. Closing as resolved. If routing this through the Project catalog is the wrong shape for the original request, say so and we can reopen with that as the specific gap.
Activity
M4n5ter commentedon Aug 14, 2026
English
Current status and overlap with the existing default Project
This issue was opened before #2446 introduced a first-class default Project under Settings → Projects. The current behavior for a new conversation without an explicit workspace is now:
This ordering is implemented in
resolveDesktopSessionWorkspace().As a result, the original “no workaround today” statement is no longer fully current: a user can add a general-purpose directory such as
~/agentas a Project and make it the default. New conversations will then start from that directory.#2998 is therefore not an exact duplicate, but its remaining scope is much narrower than the original issue suggests. It adds a second default location that applies only when the current selection has no Project identity. The existing default Project still wins for ordinary new conversations.
There is also a Bot-specific inconsistency in the current implementation: Bot creation follows the current workspace selection rather than the configured default Project. #2998 addresses only the “no Project” branch by giving it a raw fallback path; it does not make Bots honor the existing default Project.
Before proceeding with #2998, I think we should clarify the intended product behavior:
My current recommendation is to treat most of this issue as superseded by #2446. If Bots should follow the configured default, the smaller and more coherent fix would be to make Bot workspace resolution reuse the existing default-Project policy. We should add a second default setting only if keeping conversations ungrouped while assigning them a custom cwd is an explicit product requirement.
中文
当前状态以及与现有“默认项目”功能的重叠
本 Issue 创建之后,#2446 已经在 设置 → 项目 中引入了正式的“默认项目”功能。目前,没有显式指定工作区的新对话会按以下顺序解析:
这一优先级已经实现在
resolveDesktopSessionWorkspace()中。因此,Issue 原文中“目前没有替代方案”的描述已经不完全符合现状:用户可以把
~/agent之类的通用目录添加为项目,并将其设为默认项目,之后的新对话就会从该目录开始。所以 #2998 并非代码层面的完全重复,但它实际补充的范围已经比原 Issue 所描述的窄很多:它新增的是第二个默认位置,并且只在当前选择没有项目身份时生效。对于普通新对话,现有默认项目仍然优先。
当前实现还存在一个与 Bot 有关的不一致:Bot 创建会话时沿用当前工作区选择,并不会读取已经配置的默认项目。#2998 只是在“无项目”分支中增加了一个裸路径兜底,并没有让 Bot 遵循现有默认项目。
在继续推进 #2998 前,我认为需要先明确产品语义:
我目前的建议是:将本 Issue 的大部分需求视为已被 #2446 取代。如果真正缺失的是 Bot 应当遵循默认项目,更小且更一致的修复是让 Bot 的工作区解析复用现有默认项目策略。只有在“保持会话未归属,同时为其指定自定义 cwd”被确认是明确产品需求时,才应增加第二个默认设置。
feat(desktop): add a default working directory
feat(desktop): add a default working directory
feat(desktop): add a default working directory
feat(desktop): add a default working directory
feat(desktop): add a default working directory
github-actions commentedon Sep 14, 2026
This issue has had no human activity for 30 days and has been marked stale. It will be closed in 30 days unless someone comments.
If the issue is still current, please confirm it against the latest
mainand add any information that would help move it forward. Assigned issues and issues labelledpinnedare exempt from this policy.Astro-Han commentedon Sep 17, 2026
This is now covered by the default Project added in #2446.
resolveDesktopSessionWorkspace()inapps/desktop/src/main/new-session-project.tsconsults the configured default project before falling back to the previous selection orprocess.cwd(), so a general-purpose directory such as~/agentcan be registered as a Project and set as the default, and new conversations start there. Closing as resolved. If routing this through the Project catalog is the wrong shape for the original request, say so and we can reopen with that as the specific gap.