Repository navigation
Agent: create a computer's default workspace when a controller connects - #1665
Merged
Merged
Conversation
A paired controller's runtime start reaches the host with no request. start_runtime only chose the saved folder or the built-in workspace, and created the workspace, when a request was present without a folder. A controller therefore got the working-directory fallback meant for acp, while navigation still named the workspace as its project. On a computer that had never opened the desktop app, the first task sent to the workspace failed with "No such file or directory". Any start that names no folder is now a GUI start, with or without a request, so the folder navigation names is on disk once a controller has connected. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a computer that has never opened the desktop app (a headless Linux host run as a service, for example), a paired controller cannot use that computer's default Maple Workspace. The first task sent there fails with:
Picking another folder in the remote folder browser works. A computer whose desktop has run does not show this, because its own launch already created the folder.
Cause
navigation_bootstraptells every client, local or remote, that its project isgui_project_root: the saved folder, or else the built-in workspace, which may not exist yet. The runtime start is what creates it.LocalBackend::start_runtimeonly took that path for a request that was present and named no folder, which is what this computer's desktop sends. A controller's start arrives asTaskBootstrap, and the host dispatches it asstart_runtime(account, null). With no request at all, the start fell through to the working-directory fallback meant foracp, and the workspace was never created.Workspace creation moved into the GUI start path in #1516; the remote start has sent no request since #1170.
Fix
Any start that names no folder is a GUI start, with or without a request. Only GUIs start a runtime through
LocalBackend::start_runtime: this computer's desktop and paired controllers. A controller connecting now does what the computer's own desktop does at launch, including creating the workspace when that is the folder it starts in.Nothing changes on the wire and no capability is added. Only the execution computer needs the fix; a controller on any version benefits.
Testing
a_start_that_names_no_folder_is_a_gui_start_with_or_without_a_request: a start with no request, the desktop's request and a start that names its folder. It cannot create the realDocuments/Maple/Workspace, so it shows a start with no request reaches the workspace-creating path, not the folder appearing on disk.just ciinapps/maple-agentpassed, and the pre-commit hook passed on the commit.ci:packagelabel is on so the packages from this PR can be used for that check: a headless Linux host that has never run the desktop, driven from a paired macOS controller.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.