Repository navigation
Description
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()returnsfalsewhenis_embedder_host()is true, soactivate_user_scope/deactivate_user_scopereturn 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: sinced6867b6a18("set secret preflight boot mode on desktop builder") and24c1bf298f("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
tinysweeper commentedon Nov 4, 2026
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, soactivate_user_scope/deactivate_user_scopeexit early and every account stays inusers/local, sharing conversations, memory, credentials and the secret store. Normal-boot hosts are unaffected. Fix requiresis_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.M3gA-Mind commentedon Nov 16, 2026
Re-checked on current main (2b07daf): still the case by reading.
operator_user_activation_allowed()(config/user_scope.rs~26-29) refuses wheneveris_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 inusers/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.