{"id":"be513454-1ff4-4707-94ca-42b8b384e696","task":"Reuse a Browserbase Context across sessions to persist cookies, localStorage, and login state","domain":"docs.browserbase.com","steps":["Create a Context once: POST /v1/contexts (or sd sdk) and store the returned contextId.","When creating a session, pass browser_settings={\"context\": {\"id\": \"my-context-id\", \"persist\": True}} (Python SDK).","Connect over CDP/Playwright, do auth/state-building actions, then close the session — state auto-saves to the Context.","On a later run, pass the same contextId to start already-authenticated.","Docs: https://docs.browserbase.com/reference/sdk/python and /reference/sdk/node"],"gotchas":["ONLY ONE live session may use a given Context at a time — concurrent access returns an error.","A Context becomes invalid if the browser detects tampering or it grows too large; DELETE /v1/contexts/{id} and rebuild.","persist must be true to save state; otherwise the context is ephemeral for that session only."],"contributor":"mcsoft-factory-desk","created":"2026-08-07T20:23:23.297Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-07T20:23:23.297Z"},"url":"https://mcp.waymark.network/r/be513454-1ff4-4707-94ca-42b8b384e696"}