Skip to content

Desktop sign-in never activates the per-user profile (all accounts share users/local) since 2026-10-27 #8543

Open

Description

@M3gA-Mind

Summary

Since 2026-10-27, signing in on the desktop app no longer moves the process into the signed-in user's profile directory. Every desktop account (Google/GitHub/Twitter or local) stays in the signed-out users/local profile, so per-user isolation of conversations, memory, credentials and the secret store does not happen on desktop builds.

Cause (by reading main @ 806fc5005f)

  • config/user_scope.rs:26-29: operator_user_activation_allowed() returns false when is_embedder_host() is true, so activate_user_scope / deactivate_user_scope return early.
  • credentials/ops/gated_services.rs:14-16: is_embedder_host() only checks that a context config snapshot is bound (CoreContext::with_current_embedder_config(..).is_some()).
  • core/runtime/context_boot.rs:183-197: since d6867b6a18 ("set secret preflight boot mode on desktop builder") and 24c1bf298f ("bind preflight config as context snapshot"), every desktop boot binds that snapshot for the secret preflight.

So on desktop, auth.set_credential never writes active_user.toml, never creates users/<id>, and reload_config_or returns the boot snapshot.

Normal-boot hosts (CLI, TUI, headless core) are unaffected and still switch to users/<id>.

Impact

  • Different accounts signed in on the same desktop share one profile directory, one conversation and memory store, and one secret store.
  • It looks unintended: the snapshot is bound for the secret preflight, not to mark the desktop as an embedder.

Question

@senamakel was dropping per-user profile activation on desktop intended? If not, the likely fix is for is_embedder_host() to check for a real embedder config rather than "any snapshot is bound".

Note for whoever fixes it

Restoring the switch brings back a TinySecurity constraint. The module's identity (secret scope, audit, cipher registration) is fixed at admission (the TinySecurity design, MODULE.md, ADR 0003), and the desktop admits it at boot under users/local. A sign-in that moves to users/<id> is then refused ("security secret scope changed after module admission").

The fix therefore has to land together with deferred TinySecurity admission: no Eager preload or MCP boot jail admission while the profile is unsettled. On sign-in it must also re-bind the process globals that hold the boot config (the config snapshot, GLOBAL_GATE, live policy, text::CONFIG, the MCP jail). Otherwise sign-in breaks on desktop.

Related: #8536 (desktop sign-in fixes; deliberately does not change this).

Activity

  1. added
    priority: p1
    on Nov 4, 2026
  2. tinysweeper commented on Nov 4, 2026

    @tinysweeper

    Desktop sign-in no longer activates the per-user profile: is_embedder_host() returns true on desktop because the secret-preflight config snapshot is bound, so activate_user_scope/deactivate_user_scope exit early and every account stays in users/local, sharing conversations, memory, credentials and the secret store. Normal-boot hosts are unaffected. Fix requires is_embedder_host() to detect a real embedder config, landed together with deferred TinySecurity admission and re-binding of boot-era process globals.

    Labelled priority: p1.

  3. added theissue type on Nov 4, 2026
  4. M3gA-Mind commented on Nov 16, 2026

    @M3gA-Mind
    CollaboratorAuthor

    Re-checked on current main (2b07daf): still the case by reading. operator_user_activation_allowed() (config/user_scope.rs ~26-29) refuses whenever is_embedder_host() is true, and that is true whenever a context config snapshot is bound (credentials/ops/gated_services.rs ~14-16). The desktop still boots in secret-preflight mode and binds that snapshot (core/runtime/context_boot.rs ~187-197), and nothing clears it. So a desktop sign-in still stays in users/local.

    @senamakel, the question in the issue is still open: was dropping per-user profile activation on desktop intended? If not, the fix needs the deferred TinySecurity admission described above, so it's not a one-line change.

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

Metadata

Metadata

Assignees

Labels

priority: p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions