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
SessionCreate: models have no way to get rootId/directoryIdentity for a directory workspace #6630
@M4n5terSessionCreate asks the model for a directory (or isolated_git / project) workspace as an AgentDirectorySelection: rootId, segments and directoryIdentity (^sha256:[a-f0-9]{64}$). No model tool returns these values, and the tool description is only "Create a conversation in a selected workspace." So when a user says "start a conversation in ~/some/dir", the model has to guess them.
What we saw on rust-preview 89e7dcd, after #6626 fixed the JSON-string encoding (arguments now arrive as objects):
The Bot on K2.8 Preview sent rootId: "downloads" and directoryIdentity = the SHA-256 of the empty string. The Host answered workspace_unavailable, and the Bot told the user the directory "is not authorized yet", which is not the cause.
A normal conversation on K3.1 Pro sent rootId: "root-1" with a made-up hash. Then it spent 8+ minutes and 59 tool calls looking for a way to compute the identity: grepping source checkouts, opening the Host Root databases read-only, running nm and objdump on the maka binary, and hashing inode and path combinations. Its sandbox was off.
Only {"kind": "session", "sessionId": …}, which reuses an existing conversation's workspace, can be filled in from what the model can see (via SessionList).
The Host already has the data: the directories query (plugins/agent/native/src/service.rs) returns AgentDirectoryPage entries that carry a ready selection, but only the UI calls it. WorkHub's workhub_tasks has a per-worker Directories catalog action, which is a different path.
Possible directions; which one fits depends on whether model-chosen directories are meant to be allowed at all:
A read-only model tool over the existing directories query (roots, then children), so the model picks a real selection.
Let SessionCreate take a path and have the Host resolve and authorize it.
If only the current workspace or existing sessions' workspaces should be reachable, say so in the SessionCreate description and steer models to kind: "session", so they stop guessing.
Is this something you plan to handle, or would you like us to take it? If you tell us which direction you prefer, we can open a PR.
Taking this one: #6632 adds a WorkspaceLookup model tool over the existing directories query, with a lookup by path, and points SessionCreate at it. Happy to change direction if you would rather not expose directory browsing to models.
Fixed by #6632 (445767c): agent.create and the other workspace-selecting inputs take a path now, and the Host resolves it and captures the directory identity, so a model no longer has to supply rootId or directoryIdentity.
Activity
feat(agent): let models look up a directory's workspace selection
UncertaintyDeterminesYou4ndMe commentedon Nov 4, 2026
Taking this one: #6632 adds a
WorkspaceLookupmodel tool over the existingdirectoriesquery, with a lookup by path, and pointsSessionCreateat it. Happy to change direction if you would rather not expose directory browsing to models.M4n5ter commentedon Nov 4, 2026
English
Let's go with Direction 2 and drop caller-facing
DirectorySelectionin favor of takingpathdirectly—left concrete notes on #6632 (comment).简体中文
按方向 2 走,直接去掉调用方侧的
DirectorySelection、统一改为接收path——具体说明见 https://github.com/apache/maka/pull/6632#issuecomment-6634096352。feat(agent): select workspaces by path, not by directory selection
feat(agent): let models look up a directory's workspace selection
feat(agent): select workspaces by path, not by directory selection
feat(agent): select workspaces by path, not by directory selection (#…
UncertaintyDeterminesYou4ndMe commentedon Nov 6, 2026
Fixed by #6632 (445767c):
agent.createand the other workspace-selecting inputs take apathnow, and the Host resolves it and captures the directory identity, so a model no longer has to supplyrootIdordirectoryIdentity.