Skip to content

Recovery Codes, Encryption Keys and Device Approvals

Tokematic encrypts your personal session payloads, summaries and transcripts on your device with AES-256-GCM before upload, and gives you explicit control over who can read that data, password recovery and local credential discovery in #/security. For the plain-language version, read Who Can Read Your Data.

Keep a way back into your account on YouTube

Transcript

Your Tokematic account protects your account names, project names, session titles and summaries so only the right people can read them. This guide helps you choose between Standard and Advanced protection, keep your recovery codes handy and connect a second device. It applies to a Tokematic account, not to local use or iCloud sync.

Open Settings, Account, then Security. Who can read your data shows your choice. With Standard protection, Tokematic keeps a sealed copy of your key and can read your protected data when you ask it to. That gives you three things. Forget your password and an email reset brings your history back. Sign in on a new browser with Apple, Google, GitHub or GitLab and your history opens straight away. And Tokematic can prepare reports from your work, for you and for the teams you share with. Standard is the default and suits most people.

With Advanced protection, Tokematic deletes its copy of your key. Only you and your signed-in devices can read your protected data. Tokematic cannot, even if you ask. In return, you give up the help. Reports Tokematic prepares do not include your work, though reports written on your Mac continue. A new browser needs your password or approval from a device that is already signed in. An email reset alone cannot bring protected history back. Lose your password, every signed-in device and all your recovery codes, and that protected history is gone. Choose Advanced when keeping the key on your side matters more than those conveniences.

Both levels give you eight recovery codes. Each one gets you back in once, with no password and no device. Keep them where you would keep a spare house key. Under Advanced protection they are your safety net, so save them before you turn it on. Tokematic asks you to enter one first, to check you really have them. That check does not use the code up.

If you lose a set or think someone else has seen it, choose Replace codes. Tokematic prepares eight new codes. The old ones keep working until you confirm. Copy or download the new set, tick I saved the new recovery codes, then choose Replace old codes. From then on only the new set works.

A second signed-in device is the easiest way back in. Choose Connect a device, say whether you are on the new device or approving one, and check that the codes match. Once approved, that device reads your protected data too. Any signed-in device can also set a new password for you and keep everything, at either level.

Usage numbers and times stay readable, so pacing, alerts and the reports written on your Mac keep working. Every signed-in device keeps reading your data. And you can switch back from any unlocked device.

Standard gives you easy recovery, a quick open on any browser and reports prepared for you. Advanced keeps the key on your side. Either way, save your recovery codes and keep a second device signed in.

Two Layers of Protection and Two Protection Levels

  1. Account authentication: Your email and password (verified using a PBKDF2-HMAC-SHA256 / HKDF-SHA256 auth verifier so your raw password never leaves your browser) or OAuth sign-in (Apple, Google, GitHub or GitLab) proves who you are to the Tokematic service and manages your billing, team membership and device roster.
  2. Client-side AES-256-GCM encryption: Your personal synced records are encrypted in the browser or on your device before upload using an account data encryption key (k_data) wrapped with a key encryption key (k_kek) derived from your password.

In #/security (https://tokematic.app/#/security), you choose between two protection levels:

  • Standard protection (default): The server stores an AES-256-GCM wrapped backup copy of your encryption key (server_wrap, sealed with a server secret held outside the database). This lets you reset a forgotten password by email without a recovery code and allows scheduled server-side status reports to read your encrypted personal data on your schedule.
  • Advanced protection (opt-in): After you verify one of your eight recovery codes in #/security, the server deletes its backup copy (server_wrap). Only your password, your already signed-in devices and your eight recovery codes can unlock your personal encrypted data, and server-side scheduled status reports cannot read personal encrypted records.

Unlocking a Browser

A signed-in browser can be locked. Unlock this browser (#/history-unlock) opens your own protected project names, session titles and summaries there, with your password or by approving it from a device that is already unlocked (Connect a device…). Unlocking does not change what you can read in a project: project work opens with the keys sent to your devices. See Projects and collaboration.

Resetting Your Password and Using Recovery Codes

Tokematic supports four ways to change or recover your password while preserving your encrypted history:

  1. While signed in (#/security): Re-wraps your encryption key with your new password in the browser without re-uploading history.
  2. Email reset link (Standard protection): Re-wraps your key using the server's wrapped backup copy so your encrypted data stays intact.
  3. Reset with device (#/recover-device, works under Advanced protection): Displays a 6-character code (XXXX-XX) on the locked browser that you approve from any still signed-in Mac, iPhone, iPad or browser session within 10 minutes; the approving device wraps your key locally for your new password.
  4. One-time recovery code (#/reset, works under Advanced protection): Unwraps your encryption key locally in the browser using one of your eight 10-character recovery codes (XXXXX-XXXXX) and re-wraps it with your new password.

To generate or rotate your recovery codes, open #/security (https://tokematic.app/#/security) and save the eight codes in your password manager (such as 1Password or Apple Passwords). Generating a new set invalidates any previous codes immediately.

Local Credential Isolation on macOS

Out of the box, the macOS app reads only local CLI sign-in files in your home folder (~/.claude.json, ~/.codex/auth.json, ~/.kimi-code/, ~/.kimi/config.toml, ~/.gemini/, ~/.zcode/), manual API keys in Settings and in-app provider sign-ins, checking macOS Keychain items only with interaction disabled so no system password dialog appears on launch. Browser cookie stores (Chrome, Brave, Edge, Arc and Firefox), the Kimi desktop app store and interactive Keychain prompts are off by default behind Use browser and app sign-ins in General Settings, and Safari cookies are off by default behind Use Safari sign-ins and Full Disk Access. From Terminal, tmatic signins shows which sign-ins Tokematic can use and tmatic signins allow goes through each one that needs your OK, one at a time. For Safari it opens Full Disk Access in System Settings.

Approving and Signing Devices

When you sign into Tokematic on a new Mac, iPhone, iPad or CLI collector:

  1. Start pairing from the new device (tmatic pair on the CLI, a 6-digit pairing code or QR code from the Mac app, or Account in the Mac/iOS app).
  2. Each paired device registers its own non-exportable P-256 ECDSA keypair in the macOS Keychain or Secure Enclave and signs every upload request (X-Device-Signature).
  3. Approve the device from an existing trusted device so it receives the encryption key needed to read and write synced records. On the web, Settings > Account > Devices (#/devices, beside Security) shows a Waiting for approval list whenever a request waits: approve or deny a new device there, or deny a browser sign-in (those are approved from the app on a device that is already signed in). Add a device (also Connect a device on Security) asks which device you are using: this is the new device, you are approving another device (enter the code it shows, then Approve or Deny it), or a Linux server or Windows PC (collector setup). Approving asks you to confirm, because the device can then read your protected data.

Is Sync Working on This Mac?

On the Mac, Settings > Sync shows one line under Sync with that says where this Mac's data goes and how fresh it is, for example "Syncing with Tokematic as mat. Up to date as of 2 minutes ago." or "Sync is off. This Mac keeps recording your usage." The same line appears at the top of Settings > General.

When something needs you, the line names it and offers one button: Sign in, Set up, Try again, Retry or Allow. "Sync stopped 1 hour ago" with Retry means uploads have been failing; "This Mac is not set up on your account yet" means the service no longer knows this Mac and Retry sets it up again; "Tokematic cannot be reached" clears by itself when the service answers. A Help button opens a support email with the details.

Auditing and Revoking Devices

Open Settings > Account > Devices (https://tokematic.app/#/devices) or run tmatic core status to see every device linked to your account. The web list shows one row per device with its type (Mac, iPhone, iPad, Linux or Windows), when it was added, when it was last seen and whether it is active; revoked devices are one press away under Revoked. A Mac shows as one row even though it enrolls two parts, one for sync and one that sends work to your organizations: renaming it renames both, and revoking it revokes both. An iPhone or iPad that you connect again, for example after reinstalling the app, keeps its one entry: Tokematic recognizes the phone itself, not its name. Two phones with the same name show as two entries, and revoking one disconnects only that phone. Its details (the pencil) hold its name and Wait for tmatic push in push-only repos: some repos are set to send work only when you run tmatic push; on, that Mac waits for the push, off, it sends as it records. If an organization requires sending as you work and you agreed, that organization's work sends as it records either way. On the Mac, Settings > Sync > Your devices lists them with the day each was added, and Revoke asks before it acts: another device stops syncing and loses access to your protected data; this Mac signs out until you set it up again.

  • If a laptop is lost or a remote VM is decommissioned, revoke it in #/devices or run tmatic sync forget so it can no longer push or pull records. Revoking asks once: the device stops syncing and stops sending work to your organizations, and data already on it stays there.
  • On a machine you are retiring yourself, run tmatic unpair first to wipe local sync credentials cleanly.
  • On the Mac, Settings > Sync > Your devices marks every row that belongs to this Mac as "This Mac", including an older one from a previous key. One Mac keeps one live row: registering again retires the older row. If the server stops knowing this Mac, the Sync page says so and Retry registers it again.
  • A revoked Mac signs itself out the next time it talks to the server. Its Sync page says "Your session ended. Sign in again." and offers Sign in. Nothing on that Mac is deleted: local records and encryption keys stay, and signing in again resumes sync. A Mac set to sync with Tokematic stays on that choice while signed out; it never moves itself to iCloud.

Project Recovery for Organizations

Inside an organization, Settings > Organization > Project recovery (#/recovery) gets a member back into project history after they lose their devices. Only the organization's owner manages it: the owner sees the steps below, and anyone else sees who manages it. The sidebar entry shows for the owner only.

The organization key and your recovery codes do different jobs. The organization key restores a member's access only to project history whose keys the owner backed up under 2. Back up each project, never to personal data. Each person's own recovery codes restore their personal data.

  1. 1. Make a recovery key: The owner makes an encrypted recovery backup file (tokematic-recovery-<organization>-<date>.json) protected by a separate passphrase. Tokematic saves only the public key. Keep the file and the passphrase in two safe places; you need both to approve a request.
  2. 2. Back up each project: The owner backs up each project's history categories from a browser that can read them. Only backed-up categories can be restored later.
  3. 3. Approve requests: A member asks to get history back on one of their devices, and the owner reviews the request with the backup file and its passphrase. A request that changed or no longer exists reads No longer valid. Notices records each request and completion.

Redacting Sensitive Files Before Sharing Diagnostics

If you ever need to share a log or configuration file for troubleshooting, run it through tmatic redact first:

tmatic redact path/to/logfile.log

tmatic redact strips personal data, API keys and bearer tokens before printing to standard output.

Next video: Understand gaps in your session history

1. Getting Started & Multi-Device Setup

All guides