Gmail connector schema/runtime mismatch on Windows causes attachment_files calls to fail during argument binding
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.
1 Comment
I can confirm the bug.