Skip to content

remote server: sync home skills and global rules#12669

Open
moirahuang wants to merge 1 commit into
masterfrom
moira/fix-home-remote
Open

remote server: sync home skills and global rules#12669
moirahuang wants to merge 1 commit into
masterfrom
moira/fix-home-remote

Conversation

@moirahuang

@moirahuang moirahuang commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Remote SSH Agent conversations currently receive remote project skills and rules, but not file-based home context from the remote host. This means remote home skills such as ~/.agents/skills/... cannot be discovered or invoked, and remote file-based global rules such as ~/.agents/AGENTS.md do not affect Agent context.

This adds daemon-to-client full replacement snapshots for remote home skills and file-based global rules. The daemon sends initial snapshots during connection initialization and broadcasts replacements when local watchers observe additions, edits, or deletions.

On the client, both catalogs are stored by remote host ID:

  • Remote home skills are available from any working directory on the matching host and resolve by their exact host-qualified path.
  • Remote conversations include client-local file-based global rules, matching remote-host global rules, and applicable remote project rules.
  • Local conversations never receive remote-host global rules.
  • Remote global rules remain separate from the existing local Rules UI accessors.
  • Disconnecting the final session for a host clears its remote home skills, global rules, and bundled-skill catalog.

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

Added targeted coverage for protocol round trips, client and manager events, daemon initial/replacement delivery, snapshot validation, host isolation, exact-path skill invocation, global-rule layering, replacement/deletion, and keeping remote global rules out of local Rules UI accessors.

Validated with:

  • cargo check -p warp --features local_fs

  • Targeted tests in remote_server, ai, and warp

  • ./script/format

  • cargo clippy --workspace --all-targets --all-features --tests -- -D warnings

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp Agent Mode

Conversation: https://staging.warp.dev/conversation/4cc132a7-1b4f-4241-a0ab-de874b5342fb

CHANGELOG-IMPROVEMENT: Remote SSH Agent conversations now use home skills and file-based global rules from the remote host.

Co-Authored-By: Oz oz-agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label Jun 15, 2026
@oz-for-oss

oz-for-oss Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@moirahuang

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR makes local home skills visible in remote SSH and disconnected sessions and adjusts read-skill display text for unresolved path references.

Concerns

  • Local home skills are still emitted as path-based descriptors, but remote-session read_skill tool calls convert path strings using the remote host origin. As a result, a listed local home skill is converted back as a remote path and SkillManager::active_skill_by_reference cannot resolve it, so the advertised skill cannot actually be read or invoked.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/ai/skills/skill_manager.rs Outdated
.map(|path| (home_dir.clone(), path)),
);
}
skill_paths.extend(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] These local home skills are still serialized to the API as plain path references, but in a remote SSH session convert_read_skill uses SkillPathOrigin::Remote for path tool calls, so /home/.../.agents/skills/.../SKILL.md comes back as a remote path and active_skill_by_reference will not find the local cached skill. The PR will list home skills in remote sessions, but invoking read_skill on them still fails; preserve the local path origin in the skill reference/transport or otherwise special-case home-skill references, and add a remote-origin read-skill conversion test.

Co-Authored-By: Oz <oz-agent@warp.dev>
@moirahuang moirahuang force-pushed the moira/fix-home-remote branch from 0ed4c9f to cda1341 Compare June 16, 2026 00:29
@moirahuang moirahuang changed the title skills: include local home skills in remote SSH sessions remote server: sync home skills and global rules Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant