Codex Desktop ambient_suggestions used Computer Use to open/read Gmail in Chrome without a visible user-initiated task or clear audit trail
Summary
I observed Codex Desktop / Computer Use operating my real Google Chrome profile in the background and opening Gmail. After inspecting local Codex logs, this appears to have been triggered by Codex Desktop's built-in ambient_suggestions workflow, not by an explicit user request in the visible conversation.
The background workflow used Computer Use against Chrome, opened or navigated to Gmail Inbox, captured Gmail UI state, clicked Gmail labels, and attempted to type a Gmail search query. The generated ambient suggestion later referenced information visible from a Gmail message.
This is a serious privacy and safety issue because a proactive suggestion feature operated a logged-in browser and accessed email content without a clear foreground task, confirmation, or discoverable session/audit trail in the normal thread UI.
Environment
- Product: Codex Desktop
- Platform: macOS
- Date observed: 2026-05-25
- Timezone: Asia/Shanghai
- Workspace involved: local project at
$HOME/Projects/mini-control - Computer Use service path observed:
$HOME/.codex/computer-use/Codex Computer Use.app/Contents/MacOS/SkyComputerUseService- Computer Use client path observed:
$HOME/.codex/plugins/cache/openai-bundled/computer-use/1.0.799/.../SkyComputerUseClient
I have redacted local usernames, email addresses, account identifiers, screenshots, and message contents from this report.
What happened
At approximately 2026-05-25 16:08:59 +0800, I saw Codex Computer Use interact with my Chrome browser and open Gmail. This was surprising because I had not asked the visible Codex conversation to open Gmail or inspect my email.
Local logs show a hidden/background Codex thread associated with ambient_suggestions:
- Background thread ID:
019e5e2c-2e51-7293-832d-8c2edb680293 - Turn ID:
019e5e2c-31cd-7c11-85c6-e15498707659 - Model request timestamp:
2026-05-25 08:10:28 UTC/2026-05-25 16:10:28 +0800 - Model completion timestamp:
2026-05-25 08:10:53 UTC/2026-05-25 16:10:53 +0800 - Log source:
$HOME/.codex/logs_2.sqlite - The normal Codex session/thread database did not show this as a regular user-visible thread.
The captured model context shows that this was a proactive suggestion generation task. The task prompt instructed the model to generate personalized suggestions for the local project by inspecting project files and connected apps, including recent events such as unread emails.
Evidence from local logs
1. Computer Use service directly interacted with Chrome
System/app logs around the observed time show SkyComputerUseService moving/clicking a Chrome window and posting an HID event:
2026-05-25 16:08:58.787 +0800 SkyComputerUseService log0090 54
2026-05-25 16:08:58.838 +0800 SkyComputerUseService log0091 636.000000 629.000000 28908
2026-05-25 16:08:59.xxx +0800 SkyComputerUseService HID event posted
The service binary is the OpenAI-signed Codex Computer Use service:
$HOME/.codex/computer-use/Codex Computer Use.app/Contents/MacOS/SkyComputerUseService
TCC/log attribution also associated the Computer Use client with Codex Desktop:
responsible identifier: com.openai.codex
responsible path: /Applications/Codex.app/Contents/MacOS/Codex
requesting identifier: com.openai.sky.CUAService.cli
requesting path: $HOME/.codex/plugins/cache/openai-bundled/computer-use/1.0.799/.../SkyComputerUseClient
2. Codex Desktop created a hidden/background browser-use route
Desktop logs around the same period show a browser-use route for an unknown/background conversation:
Received turn/started for unknown conversation
conversation_id: 019e5e2c-2e51-7293-832d-8c2edb680293
pipe: /tmp/codex-browser-use/0582e698-0881-4d40-a2fb-1f678d230429.sock
This conversation was not visible as a normal persisted thread in the usual Codex session database.
3. The background context exposed Computer Use tools
The captured response.create request for the ambient_suggestions turn included:
model: gpt-5.4
reasoning effort: medium
input items: 80
context size: 1,488,772 characters
tools included: exec_command, web_search, mcp__computer_use__, ...
sandbox policy in metadata: ReadOnly
network access in metadata: false
Even though the sandbox metadata was ReadOnly, the context included Computer Use calls that operated the user's live Chrome UI.
4. The ambient_suggestions prompt asked for connected-app context
The local logs show a proactive suggestion prompt equivalent to:
Generate 0 to 3 hyperpersonalized suggestions for what this user can do with Codex in this local project: $HOME/Projects/mini-control
Get an understanding of the user's intent and goals by deeply viewing their connected apps...
Your suggestions must be based on recent events; e.g. recent Slack messages, unread emails, newly created issues, etc.
This means the Gmail access was not a random system event. It was connected to the ambient suggestions workflow's instruction to inspect connected apps and recent email/message context.
5. Computer Use inspected Chrome and clicked into Gmail
The captured context contains Computer Use transcript items against Google Chrome, including get_app_state, click, and set_value.
The relevant click sequence was:
{"app":"Google Chrome","element_index":"560"}
{"app":"Google Chrome","element_index":"18"}
{"app":"Google Chrome","element_index":"477"}
{"app":"Google Chrome","element_index":"54"}
{"app":"Google Chrome","element_index":"83"}
{"app":"Google Chrome","element_index":"35","value":"label:github \"mini-control\""}
Observed state transitions in the Computer Use outputs:
element_index: 560was Chrome'sNew Tabbutton.- After the New Tab click, Chrome showed Gmail/Inbox shortcuts and bookmarks.
- A later Chrome state showed Gmail Inbox loaded:
- Window title contained
Gmail - Address bar showed
mail.google.com/mail/u/0/#inbox element_index: 83corresponded to a Gmail label link for GitHub mail.element_index: 35corresponded to the Gmail search field.- The workflow attempted to set the search value to:
label:github "mini-control"
That final value-setting action was stopped by the user.
6. Gmail content influenced the generated suggestion
The final ambient suggestions included a suggestion based on a Gmail-visible account funding warning related to the local project deployment provider. I am not including the email sender, account, subject, or body in this public issue, but the local context clearly tied the generated suggestion to information visible in Gmail.
One of the returned suggestions had:
{"appId":"com.google.Chrome"}
Expected behavior
Ambient/proactive suggestions should not operate the user's real browser or inspect logged-in apps such as Gmail without an explicit, visible, per-run authorization.
At minimum, I would expect:
- A clear foreground prompt before any background suggestion workflow uses Computer Use.
- Explicit per-app consent before Chrome/Gmail is inspected.
- No clicking, typing, or navigation in real user apps from a passive suggestion feature.
- A visible, user-accessible audit trail showing:
- Which background task ran.
- Which model/session initiated it.
- Which app was inspected.
- Which Computer Use actions were taken.
- Which data source contributed to each suggestion.
- A setting to fully disable
ambient_suggestionsand connected-app inspection. - A stronger permission boundary between "read local repository" and "operate logged-in browser/email".
Actual behavior
- A background
ambient_suggestionstask used Computer Use. - It enumerated local/connected apps.
- It successfully inspected Google Chrome while some other app probes were denied.
- It clicked Chrome UI, opened a new tab, navigated into Gmail Inbox, clicked Gmail labels, and attempted a Gmail search.
- It generated a suggestion based on Gmail-visible content.
- The task was not easily discoverable as a normal user-visible Codex thread.
- The local plaintext model reasoning was not available; reasoning items were encrypted, so I could infer behavior only from tool calls and tool outputs.
Why this is a security/privacy problem
This behavior creates several risks:
- Email privacy leakage: sender names, subjects, snippets, and account-specific details can enter model context.
- Lateral overreach: Chrome contains logged-in sessions for many sensitive websites, not just Gmail.
- Accidental mutation: Computer Use can click, type, submit, delete, archive, send, or otherwise change remote app state.
- Prompt/context injection: email or webpage content can influence a background agent that has tool access.
- Audit gap: the background thread was not presented like a normal visible Codex task, making it difficult to understand or stop.
- Consent ambiguity: the user may believe they authorized the visible task only, while background suggestions reuse connected-app access.
Related public issues
I found several related issues that point to the same class of problem, though I did not find an exact existing issue for "ambient_suggestions opened Gmail via Computer Use":
- openai/codex#19876 - ambient suggestion command approval notifications can route to a hidden/stale/inaccessible task.
- openai/codex#18541 - ambient suggestions can run after a normal thread ends and trigger hooks.
- openai/codex#21722 - request to expose a supported way to disable browser-use ambient network initialization.
- openai/codex#20852 - request for per-agent Computer Use session/window lease/audit trail.
Suggested fixes
Please consider:
- Disable Computer Use, Chrome, browser-use, and connected-app tools for
ambient_suggestionsby default. - Require explicit user approval before any ambient/proactive feature can inspect connected apps.
- Treat Chrome as a high-risk container because it grants access to many logged-in websites.
- Make Gmail/email access a separate, clearly named permission, not an implicit consequence of Chrome access.
- Never allow passive suggestion generation to click/type/navigate in real user apps.
- Add a visible "Background tasks" / "Ambient suggestions" audit view.
- Persist hidden ambient suggestion sessions in the normal session history, or provide an equivalent first-class audit log.
- Include a per-suggestion provenance field showing which data sources were used.
- Provide a global setting to disable ambient suggestions and connected-app context gathering.
- Show an immediate notification when Computer Use is invoked by a background task, including the responsible thread/session ID.
Attachments / data I can provide privately
I can provide redacted excerpts from:
$HOME/.codex/logs_2.sqlite- Codex Desktop app logs around
2026-05-25 16:06:52to2026-05-25 16:10:53 +0800 - Sanitized Computer Use transcript entries showing the Chrome/Gmail click sequence
- Sanitized local audit markdown summarizing the behavior
I am intentionally not attaching raw logs publicly because they contain private Gmail, browser, workspace, and account context.
6 Comments
🔧 Solution Proposed
Here's a detailed technical analysis and proposed fix for this issue.
---
Solution: Codex Desktop ambient_suggestions Used Computer Use Without User Task
Issue
https://github.com/openai/codex/issues/24433
Root Cause Analysis
Codex Desktop's
ambient_suggestionsfeature used Computer Use to open and read Gmail in Chrome without any visible user-initiated task or clear audit trail. This is a security/privacy issue — the ambient suggestion system is autonomously performing actions that involve user data (email) without explicit user consent.Why This Is a Problem
Likely Cause
The
ambient_suggestionssystem likely has a permission model that allows it to:This is too permissive for a feature that runs "in the background."
Proposed Fix
Fix 1: Require Explicit Approval for Computer Use Actions
Fix 2: Add Audit Trail for All Ambient Actions
Fix 3: Restrict ambient_suggestions Scope
Verification Steps
Impact Assessment
Estimated Value: $2,000–$3,000
Delete this.
Hi @EYHN — your Codex ambient_suggestions report is the exact class of problem I’m trying to validate against: a background/local tool path touched a sensitive logged-in app, and the normal user-visible audit/consent boundary was not clear enough.
I maintain Agent_Sudo, a small local MCP permission gateway. I’m not asking for architecture feedback or a Codex integration discussion. I’m trying to see whether the current 5-minute evaluation is understandable and useful for people who care about local tool execution boundaries.
The eval proves one narrow loop:
blocked -> delegated once -> allowed once -> blocked again -> audit verified
Guide:
https://github.com/Kisyntra/Agent_Sudo/blob/main/docs/evaluate_5_minutes.md
If you can spare five minutes, could you run it and reply with just:
That’s the only signal I’m looking for right now.
I observed the same class of privacy/permission-boundary issue today, with a slightly different tool path: Chrome extension / signed-in internal website rather than Gmail via Computer Use.
All sensitive company and local-machine details are intentionally redacted from this public comment. I am not including the real company domain, URL, local username, workspace path, project name, internal page path, file name, screenshots, or raw logs.
Environment
codex-cli 0.121.0What happened
At approximately
2026-06-17 11:36:39 +0800, a hidden/background Codex task opened a signed-in internal company website in my existing Chrome profile.The task then read a DOM snapshot at approximately
2026-06-17 11:36:48 +0800.The task was not a normal visible user-started thread and did not appear to be a scheduled automation. From local logs, it looked like a background/context-aware suggestion task.
Redacted evidence:
019ed3a2-31cf-7920-a435-bd391810818f<redacted-local-project-path><redacted-internal-signed-in-url><redacted-company-domain><redacted-company-content-path>The page required my existing Chrome login state. I did not see a foreground authorization prompt clearly explaining that this hidden/background task would use Chrome, access a signed-in internal website, or read page content.
Expected behavior
Hidden/background/context-aware suggestion tasks should not access Chrome, browser history, open tabs, signed-in pages, or internal websites unless the user explicitly authorizes that specific task and host.
The prompt should clearly state:
Actual behavior
Why this matters
Chrome is a high-risk container because it contains many signed-in sessions, including internal company systems. A background suggestion feature should fail closed by default for Chrome and other connected-app/browser access.
This is especially important for internal websites because raw URLs, DOM snapshots, browser history, and page text may contain sensitive company data even when no credentials are typed by Codex.
Requested fixes
Please consider:
I am intentionally not attaching raw logs publicly because they contain internal URLs, local paths, and page content. I can provide more detail through a private/in-product feedback channel if there is a safe way to redact or limit uploaded logs.
@comeran Thanks for sharing this.
The details differ from the Gmail report, but the security concern sounds similar: a background or ambient task crossing into an authenticated context where the user-visible approval and audit boundary may not be obvious enough.
The reason I referenced Agent_Sudo earlier is that I'm experimenting with a very small fail-closed permission model around local tool execution:
blocked → delegated once → allowed once → blocked again → audit verified
I'm not suggesting it solves the browser/Chrome-extension problem directly, but it is trying to make delegation scope, approval consumption, and audit visibility explicit.
If you eventually try the evaluation, I'd still be interested in whether the approval/audit flow is understandable, even if you conclude it's not useful for your use case.
This issue maps closely to LS work on user-intent binding, authorization evidence, and replayable side-effect trails.
The central distinction is:
feature enabled
≠ this specific background task authorized
≠ this specific app/data source authorized
≠ side effects authorized
A proactive or ambient task should not inherit broad access simply because Computer Use or connected apps are available somewhere in the product.
A possible task authorization envelope:
{
"schema_version": "background-task-authorization/v0.1",
"task_id": "ambient-suggestion-001",
"task_type": "AMBIENT_SUGGESTION",
"initiator": {
"type": "SYSTEM_FEATURE",
"feature_id": "ambient_suggestions"
},
"user_intent_ref": null,
"requested_capabilities": [
{
"capability": "READ_LOCAL_REPOSITORY",
"scope": "$HOME/Projects/mini-control",
"decision": "ALLOW"
},
{
"capability": "OPERATE_EXTERNAL_APP",
"app": "Google Chrome",
"decision": "DENY"
},
{
"capability": "ACCESS_EMAIL",
"provider": "Gmail",
"decision": "REQUIRES_EXPLICIT_CONSENT"
}
],
"execution_authorized": false
}
The key invariant would be:
«A background recommendation task must not operate a logged-in external application unless the user explicitly authorized that exact task, application, data category, and interaction mode.»
Another important boundary is:
read-only sandbox metadata
≠ read-only effect in the user’s real applications
Clicking, navigating, typing, or searching inside Chrome changes external application state even if the local filesystem sandbox is marked read-only.
A semantic pre-effect event could therefore look like:
{
"event_type": "PRE_EFFECT",
"task_id": "ambient-suggestion-001",
"actor": {
"session_id": "hidden-thread-019e...",
"model": "gpt-5.4"
},
"effect": {
"class": "EXTERNAL_APP_INTERACTION",
"app": "Google Chrome",
"data_category": "EMAIL",
"operation": "NAVIGATE_AND_READ"
},
"authorization_ref": null,
"decision": "BLOCK",
"reason_code": "NO_EXPLICIT_PER_RUN_CONSENT"
}
The normal audit surface should expose:
A provenance record for the generated suggestion could include:
{
"suggestion_id": "suggestion-003",
"task_id": "ambient-suggestion-001",
"source_refs": [
{
"source_type": "LOCAL_REPOSITORY",
"scope": "$HOME/Projects/mini-control",
"authorized": true
},
{
"source_type": "EMAIL",
"provider": "Gmail",
"authorized": false
}
],
"publication_decision": "BLOCK",
"reason": "Suggestion depends on an unauthorized source"
}
This also protects against indirect data leakage: even if the email text is not displayed, a recommendation derived from unauthorized email content still reveals information from that source.
A deterministic conformance fixture could test:
Related LS work:
https://github.com/safal207/LS/issues/594
https://github.com/safal207/LS/issues/595
https://github.com/safal207/LS/issues/596
https://github.com/safal207/LS/issues/597
Would a small vendor-neutral "BackgroundTaskAuthorization" and "ExternalAppEffectEvent" fixture help make consent, provenance, and background Computer Use behavior machine-testable?