Gmail connector schema/runtime mismatch on Windows causes attachment_files calls to fail during argument binding
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- api, backend, testing-qa
Research direction
Start by tracing the Gmail connector's discovery and action-binding paths, then compare the advertised legacy flat schema with the runtime's newer message schema and rollout/version handling. Reproduce the Windows attachment case and add regression coverage for absolute paths, multiple attachment counts, and common or binary extensions; done means discovery and binding accept the same schema and report missing arguments precisely.
Written by the indexing model from the issue text.
Description
Summary
On Codex Desktop for Windows, the Gmail _send_email tool advertised a legacy flat argument schema containing to, subject, body, and attachment_files: string[]. Calls conforming to that advertised schema then failed before Gmail send execution with:
InvalidActionArgumentsErrorerror_code: INVALID_ARGUMENTreason: missing_required_argumentfailure_stage: argument_binding
Shortly afterward, the same Gmail connector exposed a different schema that requires a top-level message object with a MIME payload tree and no longer includes attachment_files or the legacy flat fields.
This strongly suggests a schema-discovery/runtime-binder version mismatch during a connector rollout: clients were given the old attachment_files contract while the action binder was already validating against the newer message contract.
Environment
- Windows, Codex Desktop
- Codex CLI/runtime:
0.144.6 - Gmail plugin:
0.1.5 - Gmail connector ID:
connector_2128aebfecb84f64a069897515042a44 - Observed: 2026-07-25, Asia/Shanghai
Timeline
- 08:20: An attachment send using the legacy flat schema succeeded.
- 08:56 and 08:57: Two calls with three attachments failed at
argument_binding. - 09:31: Tool discovery still advertised the legacy
attachment_filesschema; required fields were onlytoandsubject. - 09:32: A conforming call with four attachments failed with the same structured error.
- During subsequent diagnostics, tool discovery returned the newer schema requiring top-level
messageand a MIME payload tree.
Validation performed
No test email was sent during diagnosis.
- All failing
attachment_filesvalues were absolute Windows paths and were inside the active cwd/workspace. - Paths contained no spaces, non-ASCII characters, invalid Windows characters, or trailing spaces/dots, and were below 260 characters.
- The attachment arrays were preserved exactly from the model-generated function call through the MCP invocation; no slash conversion, truncation, or JSON escaping corruption occurred.
- The same legacy contract had previously succeeded with multiple attachment counts and common file extensions, including the same extensions used in the first failures.
- Gmail search/read operations remained healthy, and the authenticated Gmail web UI successfully sent the same files, so this was not an OAuth or Gmail account failure.
- The error was returned during connector argument binding, before Gmail send execution.
Expected behavior
Tool discovery and the runtime action binder should expose and validate the same schema version. A call valid under the advertised schema should not fail because the runtime is expecting an undisclosed required field.
Suggested fixes
- Switch connector discovery schema and runtime action versions atomically.
- During migration, retain a compatibility adapter from legacy flat fields and
attachment_filesto the newmessage.payloadMIME tree. - Include the exact missing argument name (likely
messagein this case) inmissing_required_argumenterror data. - Add Windows regression coverage for absolute paths, multiple attachment counts, and common/binary extensions.
Privacy
This report intentionally excludes email addresses, subjects, message bodies, filenames, local paths, attachment contents, OAuth data, and raw logs.
- 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 ·