Rovo Studio should refresh its own session automatically on a gateway 401, instead of showing the "AGG" (We can't connect) error

XMLWordPrintable

      Description

      Rovo Studio maintains its own session cookie (cloud.session.token) on studio.atlassian.com, independent of the user's main Atlassian session (id.atlassian.com) used by Jira, Confluence, and Rovo Chat. This cookie is host-only (no Domain attribute), meaning it is inherently isolated from identity-session renewals on other Atlassian hosts.

      When a user's Atlassian Guard authentication policy has a session-expiration window shorter than or close to typical inactivity periods between Studio visits (e.g., absolute session expiry around 24–30 hours), the following sequence occurs:

      1. The user is active in other Atlassian products (Jira, Rovo Chat, etc.), and their main Atlassian session is silently renewed by the identity provider/Guard before it expires.
      1. Studio's own session cookie, however, is not renewed at the same time — it continues to reference the now-expired session. The token's lifetime is capped by the organization's Guard absolute session expiry policy.
      1. The next time the user opens Rovo Studio (e.g., via "Edit agent" from Rovo Chat or a direct agent link), Studio's first gateway call (e.g., AppSelectorQuery) is rejected with an HTTP 401 (FAILURE_CLIENT_AUTH) from the Atlassian GraphQL Gateway (AGG).
      1. Studio renders this as a hard failure screen: "We can't connect — We're having trouble verifying your account. Error code: AGG."
      1. Clicking "Log in again" silently drives the user through id.atlassian.com/login/authorize → studio.atlassian.com/SetCST, which mints a fresh Studio session cookie and immediately resolves the issue — confirming the user's account, license, and permissions were never the actual problem.

      This creates a confusing, disruptive experience: users with valid access are shown an unexplained error screen and must manually click through a re-authentication step every time Studio's internal session lags behind their main Atlassian session, which recurs roughly every session-expiration interval of Studio inactivity.

      This has been confirmed by engineering (Studio foundations) as current expected behavior — Studio intentionally shows the AGG error rather than auto-triggering recovery — but it is a poor user experience, especially for organizations with shorter Atlassian Guard session-expiration policies.


      Enhancement (Proposed)

      When Studio's first authenticated call to the gateway fails with a 401/FAILURE_CLIENT_AUTH due to an expired cloud.session.token, Studio should:

      • Detect that the failure is specifically due to an expired/stale Studio-side session (as opposed to a genuine permissions or licensing denial).
      • Automatically perform the same id.atlassian.com/login/authorize → studio.atlassian.com/SetCST handoff that "Log in again" currently performs manually, transparently refreshing the session cookie in the background.
      • Only fall back to showing the "We can't connect" (AGG) error screen if automatic re-authentication itself fails (e.g., the user's main Atlassian session is also genuinely expired or access is denied).

      This would eliminate unnecessary manual "Log in again" clicks for users whose underlying Atlassian session is still valid, align Studio's session lifecycle behavior with how other Atlassian products handle stale session cookies, and reserve the AGG error screen for cases where there is a genuine authentication/authorization failure.

              Assignee:
              Jake Medeiros
              Reporter:
              Thiago Gomes
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: