Notion AI: support multiple accounts/workspaces simultaneously
Summary
Please add first-class multi-account / multi-workspace support to the Notion AI provider so CodexBar can monitor more than one Notion allowance at the same time.
Codex already has a native multi-account model with separate account rows, an active account selector, and segmented/stacked menu presentation. Notion currently exposes only one configured session plus one selected workspaceID.
Current behavior
The current Notion provider:
- imports one Notion
token_v2browser session (or accepts one manual cookie/token); - calls
/api/v3/getSpacesto discover the workspaces visible to that session; - automatically selects the first Business/Enterprise workspace unless a single Workspace ID is pinned;
- stores only one
workspaceIDfor the provider; - therefore shows only one Notion AI allowance at a time.
This means two common setups are not supported:
- One Notion account, multiple Business/Enterprise workspaces — the same session can see several eligible spaces, but CodexBar can monitor only one at a time.
- Multiple Notion accounts — e.g. personal/work or different organizations with separate
token_v2sessions — there is no Notion account switcher / stacked account view.
Requested behavior
Allow Notion AI to expose multiple independently refreshable account/workspace entries, ideally using the same provider-neutral multi-account presentation already used elsewhere in CodexBar.
A useful target UX would be:
- discover eligible workspaces from
getSpaces; - allow selecting more than one workspace to monitor;
- show each selected workspace as a distinct Notion account/workspace card;
- support the existing Segmented / Stacked multi-account menu layout;
- keep identity clear (account email + workspace name/tier where available);
- refresh each workspace independently and preserve per-workspace errors/cached usage;
- optionally support multiple labeled manual
token_v2sessions for users with separate Notion accounts.
Example:
Notion AI
Work — Acme
Rolling 64% left
Monthly 41% left
Personal — Side Project
Rolling 92% left
Monthly 77% left
Suggested scope
The narrowest useful first slice may be multiple workspaces under one authenticated Notion session. That path already has all workspace IDs available from getSpaces and would not require introducing a second credential source.
A follow-up could add multiple Notion sessions/accounts, for example via labeled manual token_v2 credentials or another provider-owned account source.
I would prefer the implementation to reuse CodexBar's existing provider-neutral account projection rather than duplicating the provider itself.
Why this is useful
Notion AI allowances are workspace-scoped. Users can belong to several Business/Enterprise workspaces, and their Rolling/Monthly limits are independent. Monitoring only one selected workspaceID gives an incomplete view and requires manually changing provider settings.
Relation to existing multi-account work
- #1843 is the canonical generic multi-account/provider-instance discussion.
- This request is intentionally narrower: Notion-specific account/workspace discovery and simultaneous usage display, without requiring generic duplication of every first-party provider.
- Codex's managed multi-account UX provides a useful presentation precedent.
Current implementation context
Current Notion setup/documentation uses:
/api/v3/getSpacesfor account/workspace discovery;/api/v3/getCreditRateLimitStatuswith onespaceId;- one provider
workspaceID; - one browser/manual Notion session.
Because these are unsupported internal Notion endpoints, existing fail-soft behavior should remain: one broken/expired account or workspace should not blank the others.
Environment
- macOS
- CodexBar current stable/main
- Notion AI provider enabled
- Multiple Business/Enterprise Notion workspaces and/or multiple Notion accounts
Codex review: this still needs some work. Reviewed October 5, 2026, 7:15 AM ET / 11:15 UTC.
Summary The Notion-specific capability remains missing on main and in v0.72.0. Related multi-account work provides useful precedent but does not implement simultaneous Notion workspace monitoring; the first implementation slice needs scope approval.
Reproducibility: not applicable. as a bug reproduction: source, tests, and released settings confirm the documented single-workspace limitation.
Maintainer decision needed
| Question | Recommendation |
|---|---|
| Should the first Notion slice support selected workspaces under one session, deferring multiple saved sessions? | Approve one-session workspace monitoring: Add selected workspace rows with isolated usage and errors while retaining current single-workspace settings compatibility. |
Why: Existing owner guidance favors workspace sub-rows, but this request also introduces selection, persistence, and potentially new credential storage that VISION.md requires an owner to approve.
Next step Approve the one-session workspace scope and its selection/identity contract before promoting implementation; this is new product surface rather than an automatic bug repair.
Review details
Best possible solution:
Start with opt-in workspace rows under one existing session, reuse shared presentation, preserve the single-workspace default, and isolate each workspace’s identity, usage, and errors.
Do we have a high-confidence way to reproduce the issue?
Not applicable as a bug reproduction: source, tests, and released settings confirm the documented single-workspace limitation.
Is this the best way to solve the issue?
Partly: shared presentation is the right foundation, but owner guidance favors workspace sub-rows under one session before adding a multi-session account model.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
- The first-slice scope is unresolved: workspace monitoring under one session and storing multiple independent sessions have different authentication and maintenance costs.
- Workspace identity, cached usage, and errors need isolation by the actual queried workspace; the current snapshot exports the user ID and workspace name without a workspace ID.
Codex review notes: model internal, reasoning medium; reviewed against c967d0781736.
Label changes
Label changes:
- add
P3: This is an optional monitoring capability; the documented single-workspace path remains available. - add
impact:auth-provider: The request expands Notion session and workspace routing to multiple independently tracked allowances. - add
issue-rating: 🌊 off-meta tidepool: Current issue advisory state selects this label. - add
clawsweeper:no-new-fix-pr: Current issue advisory state selects this label. - add
clawsweeper:needs-maintainer-review: Current issue advisory state selects this label. - add
clawsweeper:needs-product-decision: Current issue advisory state selects this label.
Label justifications:
P3: This is an optional monitoring capability; the documented single-workspace path remains available.impact:auth-provider: The request expands Notion session and workspace routing to multiple independently tracked allowances.
Evidence reviewed
What I checked:
- Current single-workspace fetch: The plugin discovers all workspace records, chooses one workspace, requests its spaceId, and returns one result. It does not emit independently refreshable workspace entries. (
Sources/CodexBarCore/Resources/Plugins/notion.ts:120, c967d0781736) - Released settings remain singular: The v0.72.0 settings section contains one manual cookie header and one optional workspaceID, matching current main. (
Sources/CodexBarCore/Providers/Notion/NotionProviderSettings.swift:8, cfee869f3181) - Documented behavior and test contract: Documentation describes automatic selection or pinning one workspace. NotionPluginTests asserts a single selected spaceId and snapshot; simultaneous monitoring is a new capability rather than a broken existing contract. (
docs/notion.md:67, c967d0781736) - Existing shared display foundation: The provider-neutral account projection already carries stable source identity, usage, errors, and last-known status. Notion’s descriptor does not declare token-account support, so the shared foundation alone does not enable this request. (
Sources/CodexBarCore/ProviderAccountSnapshot.swift:22, c967d0781736) - Owner guidance distinguishes workspaces from accounts: The owner’s discussion at https://github.com/steipete/CodexBar/issues/1843#issuecomment-5006625667 recommends workspace sub-rows within one account’s fetch, shared display infrastructure, and provider-owned credential switching. The generic tracker remains open; this Notion slice is not fully covered by it.
- Related identity request and canonical search: https://github.com/steipete/CodexBar/issues/4281 separately requests the actual selected workspace ID in structured output, which would help prevent workspace cache collisions. https://github.com/steipete/CodexBar/issues/1626 concerns OpenCode Go workspaces, not Notion. The searched Notion account PR results establish no open implementation candidate for simultaneous monitoring.
Likely related people:
- steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
- n0ah37: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
How this review workflow works
- ClawSweeper keeps one durable marker-backed review comment per issue or PR.
- Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
- A fresh review can be triggered by eligible
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch. - PR/issue authors and users with repository write access can comment
@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto request a fresh review only. - Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
- Maintainer-only repair and merge flows require explicit commands such as
@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review. - Maintainers can comment
@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.
Thanks @fakepooh. Notion AI usage is per workspace and the provider follows one selected workspace by design; simultaneous workspaces would need the labeled-account machinery that Notion's session model does not fit. Closing.