Automation follow-up clears apps_instructions and removes codex_apps tools
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start by tracing automation-thread resume handling around thread_source=automation, apps_instructions, and the active app tool registry. Reproduce the first follow-up after a successful scheduled turn, then add the suggested regression coverage: apps_instructions must not be disabled without an explicit request, app tool families must remain registered, and read-only profile calls must succeed.
Written by the indexing model from the issue text.
Description
Summary
A standalone Codex Desktop scheduled task can use Gmail and Google Calendar successfully on its initial turn, but the first user follow-up in the same automation chat applies apps_instructions:false and removes the entire mcp__codex_apps__* tool namespace.
The Google authorization remains valid. Fresh and ordinary resumed contexts on the same machine retain the connectors and can call read-only profile tools successfully.
Environment
- ChatGPT/Codex Desktop for Windows x64:
26.721.4979.0 - Embedded Codex CLI:
0.146.0-alpha.3.1 - Windows 11 Pro 25H2, build
26200.8875 - Scheduled task: standalone local/projectless cron
- Connected apps: Gmail and Google Calendar
Reproduction
- Connect Gmail and Google Calendar.
- Create a standalone scheduled task that reads both apps.
- Let the scheduled run complete successfully.
- In that same automation chat, send a user follow-up asking it to check Gmail again.
- Observe that Gmail and Calendar are no longer discoverable or callable.
Actual behavior
The captured session shows:
- Initial world state:
apps_instructions:true - Gmail and Calendar tools are discoverable.
- Gmail and Calendar profile/search calls succeed.
- First user follow-up starts.
- World-state delta becomes exactly
{"apps_instructions":false}. - A direct Gmail call then fails with:
TypeError: tools.mcp__codex_apps__gmail_get_profile is not a function - Filtering the active tool registry for Gmail returns
[]. - Broad discovery for Gmail, Calendar, Drive, and Slack returns no
mcp__codex_apps__*tools.
Expected behavior
A user follow-up to a scheduled-task chat should preserve or rehydrate the connected-app tool registry unless the user or workspace explicitly disables apps.
Codex should not accept the follow-up turn with a silently reduced connector catalog.
Controls
- A fresh normal task retains Gmail, Calendar, and Drive across follow-up turns.
- Gmail and Calendar profile calls succeed in those resumed normal contexts.
- Restarting or refreshing the environment restores the same existing authorizations.
- No OAuth reconnect is required.
- Plugin permission broadening does not help because the tools are removed before permission evaluation.
Impact
Integration-backed scheduled-task follow-ups can silently lose all live app access and may produce incomplete or stale answers unless the prompt explicitly fails closed.
Related issues
- #21995 covers scheduled automation connector startup failure on the initial run.
- #35298 covers a similar
codex_appshydration loss after Android Remote reconnect.
This report has a different trigger: the first user follow-up to an otherwise successful standalone automation chat.
Suggested regression test
- Start a thread with
thread_source=automationand hydrated app tools. - Complete the first turn.
- Resume the same thread with a user follow-up.
- Assert the resumed state does not set
apps_instructions:falsewithout an explicit disable. - Assert the same app tool families remain registered and read-only profile calls succeed.
Raw session logs are not attached because they contain mailbox context.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·