Skip to content

Cookie management support #408

@natorion

Description

@natorion

Is your feature request related to a problem? Please describe.

FEEDBACK WANTED

1. Problem Statement

AI agents are currently "state-blind." They cannot see, modify, or delete one of the most common forms of client-side state: browser cookies.

This is a major debugging roadblock. An agent cannot diagnose or solve entire classes of problems related to:

  • Authentication (e.g., missing session cookies)
  • A/B testing or feature flags (e.g., feature_flag_beta=on)
  • User preferences (e.g., theme=dark)

Without access to cookies, the AI is forced to guess about the application's state or ask the human to manually open DevTools, which defeats the purpose of an autonomous AI assistant.

2. Problems We Want to Solve

We believe there are three primary problems that AI agents face when dealing with cookies. We'd like to know how often you encounter these.

Problem 1: Inspecting State (The "Read" Problem)
An agent needs to read existing cookies to understand the current application state.

  • Goal: "I need to know if a session_token cookie exists and what its value is to understand why the user is seeing a '401 Unauthorized' error."
  • Goal: "I need to check the value of the feature_flag cookie to confirm my hypothesis about why a component is not visible."

Problem 2: Simulating State (The "Write/Edit" Problem)
An agent needs to set or modify cookies to test different application states or scenarios.

  • Goal: "I need to test the 'dark mode' feature. The easiest way is to set the theme cookie to dark and reload the page."
  • Goal: "I need to see if the new beta feature works. I want to add a new cookie beta_user=true."

Problem 3: Resetting State (The "Delete" Problem)
An agent needs to delete cookies to return the application to a "clean" or default state for reproducible debugging.

  • Goal: "I want to debug the 'first-time user' login flow. To do this, I must clear all session cookies for the current domain."
  • Goal: "The user's preferences seem corrupt. I want to delete the user_settings cookie and have them start fresh."

3. Key Use Cases (As Problems)

  • As an... AI agent debugging a login issue, I want to inspect all cookies for the current domain to see if the session_token is missing, expired, or malformed.
  • As an... AI agent testing a new feature, I want to set a cookie feature_flag_x=true and reload the page to see if the new UI appears.
  • As an... AI agent trying to reproduce a bug, I want to delete all cookies for this domain to ensure I am testing the application from a clean, logged-out state.
  • As an... AI agent diagnosing a UI bug, I want to modify the user_prefs cookie to test how the app behaves with different settings (e.g., lang=es).

4. Feedback Requested

We are posting this to validate which cookie-related problems are most important. We would love to know:

  • Does this capability (AI-driven cookie management) seem useful to you?
    • (Please add a 👍 reaction to this issue if you would find this useful!)
  • Which of these problems is your highest priority?
    • (Please help us rank them: 1. Inspecting, 2. Editing, 3. Deleting)
  • How important is it to support HttpOnly cookies?
    • (These are often used for authentication tokens, e.g., session_id, and are not visible to client-side JavaScript. Is support for these a "must-have" for you?)
  • What is your primary use case for this?
    • (Is it mostly for debugging authentication? Toggling feature flags? Or resetting state?)
  • Are there other state-related problems (e.g., Local Storage, Session Storage) that are just as, or more, important than cookies?

Describe the solution you'd like

s/o

Describe alternatives you've considered

s/o

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions