Repository navigation
agentHost: restore server data directory - #341172
Merged
Merged
Conversation
Stop forwarding the CLI endpoint-registry --user-data-dir to the backend server, restoring existing SSH session storage while preserving registry discovery and --server-data-dir support. Fixes #341158 Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes correctly restore storage separation and include appropriate launch-argument coverage.
0 open findings
What changed in this PR
Restores Remote Agent Host’s server data directory, preventing existing SSH sessions from disappearing after upgrades.
Changes:
- Stops forwarding endpoint-registry
--user-data-dirto the backend. - Preserves
--server-data-dirforwarding and adds regression coverage.
| File | Description |
|---|---|
cli/src/tunnels/agent_host.rs |
Removes backend user-data forwarding and updates tests. |
cli/src/commands/agent_host.rs |
Removes the obsolete configuration field assignment. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
roblourens
marked this pull request as ready for review
October 12, 2026 22:13
roblourens
enabled auto-merge (squash)
October 12, 2026 22:13
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 12, 2026
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.
Summary
Fixes #341158. Main-branch port of the release fix in #341171.
Stop forwarding the CLI's endpoint-registry
--user-data-dirto the backend server. This reverses the Rust forwarding added in #340424 on October 7, which caused existing SSH hosts to switch from their server data directory to the desktop user-data directory, leaving their existing session index and configuration behind.--server-data-dirforwarding and remove the unused backend configuration field.--user-data-dir.Normal GitHub-environment hosting already uses the server default and is unchanged. An explicit CLI
--user-data-dirnow selects only the endpoint registry, not backend storage;--server-data-dirremains available. This does not migrate sessions created in the alternate directory after the regression. The TypeScript server's support for a directly supplied--user-data-diris unchanged.How to test
Reconnect an SSH host with sessions stored under its original server data directory. Confirm the existing sessions are visible and the child server is not launched with
--user-data-dir. GitHub-environment hosting should continue to register and use its server data directory.Validation
cargo test --locked --manifest-path cli/Cargo.toml --lib agent_host::tests— passed, 55 tests on the release fix. Reused for this port after verifying that the entire trackedcli/tree is identical, including sources, tests, and dependency manifests.cargo build --locked --manifest-path cli/Cargo.toml --bin code— passed on this main-branch port.rustfmt --edition 2021 --config-path cli/rustfmt.toml --check cli/src/tunnels/agent_host.rs cli/src/commands/agent_host.rs— passed on the identical changed files in the release fix.git diff --check— passed on this main-branch port.Live SSH reconnection, live GitHub registration, and Windows runtime behavior were not exercised.
(Written by Copilot)