Skip to content

rust(feat): agent install works without client binaries - #734

Draft
evan-sift wants to merge 3 commits into
mainfrom
rust/agent-install-headless
Draft

rust(feat): agent install works without client binaries#734
evan-sift wants to merge 3 commits into
mainfrom
rust/agent-install-headless

Conversation

@evan-sift

@evan-sift evan-sift commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Description

sift-cli agent install currently requires each client's own binary on PATH: Claude Code and Codex are only detected via their binaries, and the install drives claude mcp / codex mcp for the MCP registration. In a headless environment (a container build, CI) there is no client binary, so the install reports "No supported AI coding clients were detected" and nothing can be installed — even though the agent skill is plain file IO.

This makes the command degrade gracefully instead:

  • A client's config directory (~/.claude, ~/.codex) now counts as detection, matching how Cursor and OpenCode are already detected.
  • The skill always installs for detected clients.
  • An MCP registration that needs the client's own CLI is skipped with a warning (Skipped Claude Code MCP registration: \claude` is not available on PATH. The skill is installed; rerun `sift-cli agent install` once the client is available.`) instead of failing the whole install.
  • agent doctor reports an uninspectable registration as a warning (exit 0) rather than an error, since nothing about the Sift setup itself is broken.

Conflicts (an unmanaged sift MCP entry, an unmanaged skill directory) still block the install as before.

An optional --path <DIR> on agent install also installs the skill into the named directory in addition to every detected client — and works with no detected clients at all — for image builds and packaging environments that want the skill at a fixed location. The directory receives SKILL.md and references/ directly; rerunning with the same --path refreshes it.

Verification

  • cargo test -p sift_cli — 210 passed, including end-to-end tests for the no-binary install, --path with no detected clients, --path alongside a detected client, and the updated detection test.
  • cargo clippy -p sift_cli --all-targets and cargo fmt --check clean.
  • Manual: in a fresh HOME containing only .claude/, with a PATH carrying no coding clients, sift-cli agent install installs ~/.claude/skills/sift/ (SKILL.md + references), prints the skip warning, and exits 0. With an empty HOME and --path <dir>, the skill installs to the named directory and the run succeeds.

A headless environment (container build, CI) has a client config
directory but no client binary on PATH. Detection now counts the config
directory for every harness, the skill always installs since it is plain
file IO, and an MCP registration that needs the client's own CLI is
skipped with a warning instead of failing the whole install. agent
doctor reports an uninspectable registration as a warning rather than an
error.
Image builds and other packaging environments want the agent skill at a
known location rather than a client's home-directory layout. An optional
--path <DIR> installs the skill there in addition to every detected
client, and works even when no clients are detected at all. The
directory receives SKILL.md and references/ directly; rerunning with the
same --path refreshes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant