Skip to main content

Overview

Session Isolation is ContextFort’s core security feature that prevents agents from accessing your personal accounts. When an agent enters a website, ContextFort automatically swaps your human cookies with agent-specific cookies, ensuring complete session separation.
Critical Security Feature: Without session isolation, agents could access your Gmail, bank accounts, or any logged-in service.

The Session Swap Process

  1. Agent Detected: ContextFort detects agent mode activation (⌛ emoji in tab group)
  2. Capture Human Session: All cookies for the domain are captured and stored as “human profile”
  3. Clear Domain Cookies: All cookies are removed from the browser
  4. Restore Agent Session: If an agent profile exists, those cookies are restored
  5. Page Reload: Tab reloads with agent session active

Capturing Cookies

ContextFort captures all cookies for a domain, including subdomain cookies:
chrome-extension/background.js
Why capture subdomain cookies? Many services use multiple subdomains (e.g., www.example.com, api.example.com, auth.example.com). All must be captured for complete session isolation.

Clearing Cookies

chrome-extension/background.js

Restoring Cookies

chrome-extension/background.js

Session Profiles

Storage Structure

Session profiles are stored in Chrome’s local storage:

Profile Management

chrome-extension/background.js
chrome-extension/background.js
chrome-extension/background.js

Login Flow for New Domains

When an agent visits a domain with no saved agent profile:

In-Page Notification

chrome-extension/content.js

Login Flow Steps

1

Agent attempts to access domain

Agent navigates to example.com where user is logged in
2

Human cookies captured

ContextFort captures all human cookies and clears them from browser
3

Login prompt appears

In-page notification appears: “No saved agent session for example.com”
4

User logs in manually

User enters agent credentials and completes login flow
5

User clicks 'I've Logged In'

New agent cookies are captured and saved as agent profile
6

Page reloads with agent session

Agent can now continue with isolated session

Restore Human Session

If the user decides not to create an agent profile, they can restore their human session:
chrome-extension/background.js

Swapping Back to Human Session

When the agent stops (⌛ → ✅ transition), ContextFort swaps all domains back to human sessions:
chrome-extension/background.js

Domain Tracking

ContextFort tracks which domains have been swapped per session:
chrome-extension/background.js
Each tab group (agent session) has its own set of swapped domains. This allows multiple agent sessions to run simultaneously with different session profiles.

Managing Session Profiles

View and manage all saved session profiles in the Dashboard:

View All Profiles

Delete a Profile

Security Considerations

Cookie Encryption

All session profiles are stored in Chrome’s local storage, which is encrypted at rest by Chrome’s built-in encryption.

No Cloud Sync

Session profiles are NEVER synced to cloud or transmitted externally. All data stays on your local machine.

Isolation Guarantee

Once swapped, agents cannot access human cookies unless explicitly restored by the user.

Per-Domain Profiles

Each domain has separate human and agent profiles, ensuring no cross-contamination.
Cookie Expiration: If agent cookies expire, the agent will be logged out and require re-authentication. ContextFort does not refresh expired cookies automatically.

Troubleshooting

Agent session not persisting

Problem: Agent gets logged out on every page reload Solution: Ensure you clicked “I’ve Logged In” after manually logging in. This saves the agent profile.

Human session lost after agent stops

Problem: After agent stops, human session is not restored Solution: This can happen if human cookies expired or were cleared externally. Use “Restore My Session” during the login prompt to preserve your human session.

Multiple domains require login

Problem: Agent visits 5 different sites and all require manual login Solution: This is expected behavior on first use. ContextFort will save all 5 agent profiles for future sessions.

Next Steps

Blocking Rules

Configure URL and domain blocking to prevent context mixing

Visibility

Monitor all agent sessions and cookie swaps in real-time

Screenshots

See when screenshots are captured during session swaps

Dashboard

Manage session profiles in the Dashboard UI