Skip to content

docs(skills): an agent starts the device login itself when credentials are missing - #1782

Draft
coderdan wants to merge 1 commit into
mainfrom
docs/skills-agent-starts-device-login
Draft

coderdan wants to merge 1 commit into
mainfrom
docs/skills-agent-starts-device-login

Conversation

@coderdan

Copy link
Copy Markdown
Contributor

Summary

When an agent working in a customer's repo hits missing CipherStash credentials, the stash-cli and stash-auth skills now tell it to start the login itself and show the user the approval link. Before, nothing in the skills said this, so agents tended to stop, ask the user to paste CS_* values, or run stash env, which creates a new access key each time it runs.

Changes

  • skills/stash-cli/SKILL.md: after the agent login loop, two new sections:
    • When to start it: on "no client key", NOT_AUTHENTICATED, or a profile with no key for the workspace, run stash auth login --json --region <slug> in the background, read its first event, give the user the verificationUriComplete link and user code, and wait for device_bound.
    • Choose the region; do not guess it: take it from the workspace CRN or stash auth regions. Without --region, a non-interactive login fails with "Cannot resolve a region without a prompt".
  • skills/stash-auth/SKILL.md: the first quick-diagnosis item points at that loop, and says never to run stash env to get variables.
  • .changeset/skills-agent-starts-device-login.md: stash patch, because skills/ ships in the stash tarball.

Verification

  • Followed the new steps in a live session: npx stash auth login --json --region ap-southeast-2 in the background printed the link and code. The user approved it in a browser, the command reported device_bound, and the Go SDK then encrypted and decrypted against ZeroKMS with that profile.
  • Without --region the same command failed with "Cannot resolve a region without a prompt", which is why the region section exists.
  • Did not run stash manifest --json against the new text. The skill names only auth login, --json, --region and auth regions, which the existing skill text already uses.

Related

None. This came out of verifying #1773, where an agent stopped on missing credentials.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

@changeset-bot

changeset-bot Bot commented Nov 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3e2937c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
stash Patch
@cipherstash/basic-example Patch
@cipherstash/e2e Patch
@cipherstash/stack-drizzle Patch
@cipherstash/stack-prisma Patch
@cipherstash/stack-supabase Patch
@cipherstash/stack Patch
@cipherstash/wizard Patch
@cipherstash/bench Patch
@cipherstash/prisma-example Patch
@cipherstash/test-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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