Skip to content

fix: use stored bootstrap token for whoami and search - #18

Merged
kody-bot merged 1 commit into
mainfrom
cursor/open-api-stored-token-a867
Oct 1, 2026
Merged

kody-bot merged 1 commit into
mainfrom
cursor/open-api-stored-token-a867

Conversation

@kentcdodds

Copy link
Copy Markdown
Owner

Summary

After auth bootstrap stores a scoped API token, Open API commands (whoami, search, non-local execute) now resolve that stored token the same way execute --local already did.

Shared resolveScopedApiToken priority:

  1. --token / KODY_API_TOKEN
  2. Host-scoped stored bootstrap/API token (loadStoredApiToken)
  3. Existing kody login OAuth path when no scoped token is available (unchanged: leftover env/stored token still does not hijack an active login session)

Tests

  • Unit: shouldUseApiToken / resolveApiToken cover the store fallback
  • Integration: whoami and search succeed with only a stored bootstrap token (no env, no --token, no login)

Verify

auth bootstrap --code … then kody whoami / kody search with no KODY_API_TOKEN.

No token values in this PR.

Open in Web Open in Cursor 

Open API commands now resolve auth like execute --local: --token /
KODY_API_TOKEN, then the host-scoped auth bootstrap store, then login
OAuth when applicable.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kentcdodds
kentcdodds marked this pull request as ready for review October 1, 2026 23:23
@kentcdodds

Copy link
Copy Markdown
Owner Author

bugbot run

@cursor

cursor Bot commented Oct 1, 2026

Copy link
Copy Markdown

Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings.

@kody-bot
kody-bot merged commit de81eff into main Oct 1, 2026
5 checks passed
@kody-bot
kody-bot deleted the cursor/open-api-stored-token-a867 branch October 1, 2026 23:24
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants