Skip to content

Document 1Password disconnect, revoking accounts, and revoke on delete - #767

Merged
bmsaadat merged 4 commits into
mainfrom
bmsaadat/kernel-2808-1password-disconnect
Nov 18, 2026
Merged

bmsaadat merged 4 commits into
mainfrom
bmsaadat/kernel-2808-1password-disconnect

Conversation

@bmsaadat

@bmsaadat bmsaadat commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Documents the 1Password disconnect and revoke behavior from kernel/kernel#5543 and kernel/kernel#5544 (in production, SDK 0.149.0):

  • New "Disconnect an account" section: when 1pw_disconnect is offered, what it does (fills stop, revoke or detach, account back to reconnect_required, credentials need new access requests after relinking), the 409 provider_revocation_pending case, and the five revocation events.
  • revoking added to the account status table.
  • "Delete items" now covers revoke on account and vault delete, and include_deleted for reading events after deletion.
  • Disconnect added as step 5 of the KERNEL-managed client checklist.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only updates to 1Password vault guides; no runtime or API implementation changes.

Overview
Expands vaults/1password.mdx to match KERNEL disconnect/revoke behavior (SDK 0.149.0).

Adds a Disconnect an account section for 1pw_disconnect: when it’s available, immediate fill refusal, revoke vs vault detach, transition to reconnect_required / credential re-approval, 409 provider_revocation_pending, and revocation events, with TypeScript/Python samples.

The account status table gains revoking. The KERNEL-managed checklist adds step 5 to call 1pw_disconnect on user disconnect.

Delete items is updated for account/vault deletion triggering the same revoke flow, partial vault delete on pending revoke, and reading post-delete account events via include_deleted: true.

Reviewed by Cursor Bugbot for commit 53e785a. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Kernel 🟢 Ready View Preview Nov 18, 2026, 8:03 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

…n details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@masnwilliams masnwilliams 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.

Thanks, this matches the backend behavior closely. I checked each claim against the API, and three things would mislead readers. All three are small fixes and are commented inline:

  1. A vault delete that returns 409 has already disconnected its accounts and cleared their credentials' approvals.
  2. The disconnect sample can send the request again, because the SDKs retry 409 by default.
  3. Relinking fails while the account is still revoking.

Optional

  • credential_account_revocation_started is only recorded when KERNEL sends a revoke to 1Password. A detach records only credential_account_detached. "KERNEL started revoking the connection at 1Password" would describe it more accurately.
  • With include_deleted, a key matches a live item before a deleted one. If an account was recreated under the same key, the events sample returns the new account's events. Suggest passing the deleted item's id to read the old account's history.
  • The page now says KERNEL doesn't revoke a token you supplied three times (the own-client section, Delete items, and Limitations). The copy in Delete items can go.
  • The three "1Password hasn't confirmed yet" paragraphs (disconnect, account delete, vault delete) could become one short table. It's not needed once the fixes are in.

Comment thread vaults/1password.mdx Outdated
Comment on lines +877 to +879
deleting a vault ends each of its 1Password accounts the same way. if 1Password
hasn't confirmed one of them, the delete returns `409`
`provider_revocation_pending` and keeps the vault. retry the deletion later.

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.

Deleting a vault disconnects every 1Password account in it before checking whether any revoke is still pending. So when this returns 409 provider_revocation_pending and keeps the vault, the accounts are already reconnect_required or revoking, and all their credential items have lost their approvals. Someone who reads the 409 as "nothing happened" will find their logins no longer fill.

Suggested change
deleting a vault ends each of its 1Password accounts the same way. if 1Password
hasn't confirmed one of them, the delete returns `409`
`provider_revocation_pending` and keeps the vault. retry the deletion later.
deleting a vault disconnects each of its 1Password accounts, then deletes the
vault. if 1Password hasn't confirmed one of them, the delete returns `409`
`provider_revocation_pending` and keeps the vault, but its accounts are already
disconnected and their `credential` items have lost their approvals. don't keep
using the vault; retry the deletion later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 25eb20d, with your wording: the accounts are already disconnected, their credentials have lost their approvals, and the vault shouldn't be used before retrying the deletion.

Comment thread vaults/1password.mdx Outdated
const disconnected = await kernel.vaults.items.performOperation("1password-account", {
id_or_name: vault.id,
type: "1pw_disconnect",
});

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.

Both SDKs retry 409 responses by default, and this one doesn't set x-should-retry: false. A pending revoke therefore makes this sample send 1pw_disconnect up to three times, which contradicts "don't invoke it again" below. Repeating it is harmless on the server, but it can block for about a minute. Turning off retries, as the 1pw_fill sample already does, keeps the sample and the text consistent.

Suggested change
});
}, { maxRetries: 0 });

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 25eb20d: the TypeScript sample passes { maxRetries: 0 }, matching the 1pw_fill sample.

Comment thread vaults/1password.mdx
```python Python
disconnected = kernel.vaults.items.perform_operation(
"1password-account",
id_or_name=vault.id,

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.

Same as the TypeScript sample: turn off SDK retries so a 409 provider_revocation_pending isn't sent again.

Suggested change
id_or_name=vault.id,
disconnected = kernel.with_options(max_retries=0).vaults.items.perform_operation(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 25eb20d: the Python sample uses with_options(max_retries=0).

Comment thread vaults/1password.mdx Outdated

- fills from the account stop immediately.
- KERNEL revokes the connection at 1Password, unless another vault still uses it; then only this vault's link ends.
- the account returns to `reconnect_required`. repeat the account upsert to link it again.

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.

Upserting a revoking account returns 409. Linking the same 1Password user in another vault during that time also fails: the account goes to reconnect_required with "1Password is ending this person's previous connection". Readers need to wait before relinking.

Suggested change
- the account returns to `reconnect_required`. repeat the account upsert to link it again.
- the account returns to `reconnect_required`. once it's no longer `revoking`, repeat the account upsert to link it again.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 25eb20d: relink once the account is no longer revoking.

Comment thread vaults/1password.mdx Outdated
| `connected` | the connection is usable | define credential items |
| `declined` | the user declined consent | repeat the upsert to get a new authorization url, or use `1pw_recover` when it's advertised |
| `reconnect_required` | the connection needs reauthorization; `state.status_reason` explains why | repeat the upsert, or use `1pw_recover` when it's advertised |
| `revoking` | the account was disconnected or deleted, and 1Password hasn't confirmed yet. fills have stopped. | nothing; KERNEL finishes it in the background |

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.

"nothing" isn't quite right: an account upsert returns 409 until the account leaves revoking.

Suggested change
| `revoking` | the account was disconnected or deleted, and 1Password hasn't confirmed yet. fills have stopped. | nothing; KERNEL finishes it in the background |
| `revoking` | the account was disconnected or deleted, and 1Password hasn't confirmed yet. fills have stopped. | wait; KERNEL finishes it in the background. don't upsert the account until it leaves `revoking` |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 25eb20d: the revoking row now says to wait and not upsert the account until it leaves revoking.

…connect, wait for revoking

Also says revocation_started means a revoke was sent, reads deleted events by
account id, and drops a repeated sentence about supplied tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bmsaadat

Copy link
Copy Markdown
Contributor Author

Thanks @masnwilliams, all three fixes are in 25eb20d. From the optional notes:

  • credential_account_revocation_started now reads "KERNEL started revoking the connection at 1Password".
  • The include_deleted section says a key matches a live item first and the samples pass the account's id.
  • Dropped the repeated "doesn't revoke a token you supplied" sentence from Delete items.

I left the three pending paragraphs as prose rather than a table, since they read fine with the fixes in.

@masnwilliams masnwilliams 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.

Thanks, all three fixes look right, and the optional changes too. Checks are green.

Two optional wording notes, not blocking:

  • "fills from the account stop immediately": KERNEL refuses new 1pw_fill calls right away, but a fill already running can still finish with the login the extension already fetched. "new fills are refused immediately" would be exact.
  • credential_account_revocation_unconfirmed doesn't say what happens to the connection. Without a usable token it can't be revoked, so it lapses when its refresh token expires, within 30 days of its last refresh. Worth a clause for readers doing a security review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bmsaadat

Copy link
Copy Markdown
Contributor Author

Took both in 53e785a, thanks. "new fills are refused" now replaces "fills stop" in the disconnect bullet, the revoking row and the pending-disconnect paragraph, and credential_account_revocation_unconfirmed says the connection lapses when its refresh token expires, within 30 days of its last refresh.

@bmsaadat
bmsaadat merged commit 3e94dd7 into main Nov 18, 2026
3 checks passed
@bmsaadat
bmsaadat deleted the bmsaadat/kernel-2808-1password-disconnect branch November 18, 2026 20:09

This branch was successfully deployed

1 active deployment
staging — 53e785a5 Deployed Nov 18, 2026 by mintlify[bot]
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.

2 participants