English
What happened
After importing a Codex conversation in Maka Desktop on Windows, the imported Session can be opened and its transcript is present, but sending the next message fails when the Codex source cwd is not a usable directory on the Maka Host:
Project root is not a canonical local directory (code=invalid_request)
The current task workspace is unavailable.
The original directory may have moved, been deleted, or become inaccessible.
Select an available workspace.
Selecting a workspace from this recovery guidance does not repair the imported Session. It changes the default workspace and opens a new task. The original imported Session keeps its old cwd; reopening it and sending again produces the same failure. This breaks the intended continue-the-imported-conversation flow.
How to reproduce
- On Windows, create a Codex conversation in a project directory.
- Make the source directory unavailable to Maka, for example move the project, change its drive mapping, use a WSL/native path mismatch, or import the session data from another machine. The same behavior applies to any imported source whose
cwd is no longer accessible.
- In Maka Desktop, open Settings → Activity → Import tasks and import the Codex conversation.
- Open the imported Maka Session and send a message.
- Observe the canonical-local-directory error and workspace-unavailable notice.
- Select an available workspace.
- Observe that Maka opens a new task instead of rebinding the imported Session. Return to the imported Session and send again; the failure remains.
Expected behavior
- Import should allow the user to choose a target workspace for the new Maka Session, or
- when the imported Session
cwd is unavailable, the recovery action should explicitly rebind that same Session through the existing session.workspace.relocate authority.
- The Session ID and imported transcript should be preserved.
- The chosen workspace must be validated on the owning Runtime Host before the rebind is committed.
- The UI must not silently fall back to the app default or create a replacement Session. Creating a new task can remain a separate explicit action.
- If a message was drafted before the repair, the draft and user intent should remain available after the workspace is repaired.
Root cause evidence
The external importer currently defaults the imported Session cwd to the source adapter metadata cwd when no target cwd is supplied. The Desktop import request supplies only adapter ID and source Session ID, so it cannot provide a target workspace.
The existing Session workspace picker selects the app default project. When the active Session owns the selection, the renderer deliberately opens the new-task surface; it does not issue session.workspace.relocate.
Session-scoped project context then validates the persisted Session cwd and fails closed if the directory is missing or inaccessible. Runtime Host Skill Catalog validation separately reports Project root is not a canonical local directory.
This is related to, but distinct from:
Environment
- Maka version or commit: packaged version unknown; behavior confirmed against current source main at
8dfc68d23
- OS: Windows (exact version not provided)
- Surface: Desktop
- Source: Codex external Session import
- Node.js: not applicable for packaged Desktop
简体中文
实际发生的问题
在 Windows 的 Maka Desktop 中导入 Codex 会话后,可以打开导入出的 Session 并看到历史记录,但当 Codex 来源的 cwd 在 Maka Host 上不可用时,发送下一条消息会失败:
Project root is not a canonical local directory (code=invalid_request)
当前任务的工作区不可用
用户根据提示选择可用工作区后,Maka 实际上只是切换了新任务默认工作区并打开了一个新任务,并没有修改原导入 Session 的工作目录。原 Session 仍保存旧的 cwd,再次打开并发送仍然失败。
复现步骤
- 在 Windows 的某个项目目录中创建 Codex 会话。
- 让该目录对 Maka 不可用,例如移动项目、改变盘符映射、混用 WSL 与 Windows 路径,或从另一台机器导入会话数据。
- 在 Maka Desktop 打开 设置 → 活动 → 导入任务,导入该 Codex 会话。
- 打开导入后的 Maka Session 并发送消息。
- 看到 canonical local directory 和 workspace unavailable 错误。
- 选择一个可用工作区。
- 观察 Maka 打开新任务,而不是修复原导入 Session;返回原 Session 后再次发送,错误仍然存在。
预期行为
- 导入时允许用户为新 Session 选择目标工作区;或者
- 当导入 Session 的
cwd 不可用时,工作区恢复操作应通过现有 session.workspace.relocate 权威边界显式重绑定当前 Session。
- 保留原 Session ID 和已导入的对话历史。
- 新工作区必须由所属 Runtime Host 校验后再提交。
- 不能静默回退到应用默认目录,也不能用新任务替代原 Session;新建任务可以继续作为独立的明确操作。
- 如果修复前用户已有草稿,应在修复工作区后保留草稿和发送意图。
代码确认
外部会话导入在没有目标 cwd 时,会使用来源 Adapter 的 cwd。Desktop 导入请求只传 Adapter ID 和来源 Session ID,因此没有目标工作区输入。
当前 Session 的工作区选择器修改的是应用级默认项目;当当前已有 Session 持有该选择时,Renderer 会主动打开新任务界面,并不会调用 session.workspace.relocate。
随后 Session 上下文会严格校验持久化 cwd;目录不存在或不可访问时 fail closed。Runtime Host 的 Skill Catalog 又会对同一个路径做 canonical、stat 和 realpath 校验,因此出现 Project root is not a canonical local directory。
相关但不重复:
环境
- Maka 版本或 commit:打包版本未知;当前源码 main
8dfc68d23 已确认代码路径
- OS:Windows,具体版本未提供
- Surface:Desktop
- 来源:Codex external Session import
- Node.js:打包 Desktop 不适用
AI assistance: OpenAI Codex assisted with source inspection and issue drafting. The report is based on the current source paths and the user observed behavior; packaged Windows verification was not available in this workspace.
English
What happened
After importing a Codex conversation in Maka Desktop on Windows, the imported Session can be opened and its transcript is present, but sending the next message fails when the Codex source
cwdis not a usable directory on the Maka Host:Selecting a workspace from this recovery guidance does not repair the imported Session. It changes the default workspace and opens a new task. The original imported Session keeps its old
cwd; reopening it and sending again produces the same failure. This breaks the intended continue-the-imported-conversation flow.How to reproduce
cwdis no longer accessible.Expected behavior
cwdis unavailable, the recovery action should explicitly rebind that same Session through the existingsession.workspace.relocateauthority.Root cause evidence
The external importer currently defaults the imported Session cwd to the source adapter metadata cwd when no target cwd is supplied. The Desktop import request supplies only adapter ID and source Session ID, so it cannot provide a target workspace.
The existing Session workspace picker selects the app default project. When the active Session owns the selection, the renderer deliberately opens the new-task surface; it does not issue
session.workspace.relocate.Session-scoped project context then validates the persisted Session cwd and fails closed if the directory is missing or inaccessible. Runtime Host Skill Catalog validation separately reports
Project root is not a canonical local directory.This is related to, but distinct from:
Environment
8dfc68d23简体中文
实际发生的问题
在 Windows 的 Maka Desktop 中导入 Codex 会话后,可以打开导入出的 Session 并看到历史记录,但当 Codex 来源的
cwd在 Maka Host 上不可用时,发送下一条消息会失败:用户根据提示选择可用工作区后,Maka 实际上只是切换了新任务默认工作区并打开了一个新任务,并没有修改原导入 Session 的工作目录。原 Session 仍保存旧的
cwd,再次打开并发送仍然失败。复现步骤
预期行为
cwd不可用时,工作区恢复操作应通过现有session.workspace.relocate权威边界显式重绑定当前 Session。代码确认
外部会话导入在没有目标
cwd时,会使用来源 Adapter 的 cwd。Desktop 导入请求只传 Adapter ID 和来源 Session ID,因此没有目标工作区输入。当前 Session 的工作区选择器修改的是应用级默认项目;当当前已有 Session 持有该选择时,Renderer 会主动打开新任务界面,并不会调用
session.workspace.relocate。随后 Session 上下文会严格校验持久化 cwd;目录不存在或不可访问时 fail closed。Runtime Host 的 Skill Catalog 又会对同一个路径做 canonical、stat 和 realpath 校验,因此出现
Project root is not a canonical local directory。相关但不重复:
环境
8dfc68d23已确认代码路径AI assistance: OpenAI Codex assisted with source inspection and issue drafting. The report is based on the current source paths and the user observed behavior; packaged Windows verification was not available in this workspace.