hermes - 💡(How to fix) Fix [Bug]: invalid_function_parameters for memory tool on Codex/ChatGPT

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

⚠️ API call failed (attempt 1/3): BadRequestError [HTTP 400] 🔌 Provider: openai-codex Model: gpt-5.5 🌐 Endpoint: https://chatgpt.com/backend-api/codex 📝 Error: HTTP 400: Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level. 📋 Details: {'message': "Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.", 'type': 'invalid_request_error', 'param': 'tools[15].parameters', 'code': 'invalid_function_parameters'} ⚠️ Non-retryable error (HTTP 400) — trying fallback... ❌ Non-retryable error (HTTP 400): HTTP 400: Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level. ❌ Non-retryable client error (HTTP 400). Aborting. 🔌 Provider: openai-codex Model: gpt-5.5 🌐 Endpoint: https://chatgpt.com/backend-api/codex 💡 This type of error won't be fixed by retrying.

 Error: Error code: 400 - {'error': {'message': "Invalid schema for function 'memory': schema must have type 'object' and not have                              
 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.", 'type': 'invalid_request_error', 'param': 'tools[15].parameters', 'code':                             
 'invalid_function_parameters'}}

Root Cause

Root Cause Analysis (optional)

Fix Action

Fix / Workaround

⚠️  API call failed (attempt 1/3): BadRequestError [HTTP 400]
   🔌 Provider: openai-codex  Model: gpt-5.5
   🌐 Endpoint: https://chatgpt.com/backend-api/codex
   📝 Error: HTTP 400: Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.
   📋 Details: {'message': "Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.", 'type': 'invalid_request_error', 'param': 'tools[15].parameters', 'code': 'invalid_function_parameters'}
⚠️ Non-retryable error (HTTP 400) — trying fallback...
❌ Non-retryable error (HTTP 400): HTTP 400: Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.
❌ Non-retryable client error (HTTP 400). Aborting.
   🔌 Provider: openai-codex  Model: gpt-5.5
   🌐 Endpoint: https://chatgpt.com/backend-api/codex
   💡 This type of error won't be fixed by retrying.

Code Example

⚠️  API call failed (attempt 1/3): BadRequestError [HTTP 400]
   🔌 Provider: openai-codex  Model: gpt-5.5
   🌐 Endpoint: https://chatgpt.com/backend-api/codex
   📝 Error: HTTP 400: Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.
   📋 Details: {'message': "Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.", 'type': 'invalid_request_error', 'param': 'tools[15].parameters', 'code': 'invalid_function_parameters'}
⚠️ Non-retryable error (HTTP 400) — trying fallback...
Non-retryable error (HTTP 400): HTTP 400: Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.
 Non-retryable client error (HTTP 400). Aborting.
   🔌 Provider: openai-codex  Model: gpt-5.5
   🌐 Endpoint: https://chatgpt.com/backend-api/codex
   💡 This type of error won't be fixed by retrying.
                                                                                                                                         
     Error: Error code: 400 - {'error': {'message': "Invalid schema for function 'memory': schema must have type 'object' and not have                              
     'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.", 'type': 'invalid_request_error', 'param': 'tools[15].parameters', 'code':                             
     'invalid_function_parameters'}}

---

Report       https://paste.rs/D362m
agent.log    https://paste.rs/IjVy5
gateway.log  https://paste.rs/rEJKU

---
RAW_BUFFERClick to expand / collapse

Bug Description

This commit https://github.com/NousResearch/hermes-agent/pull/21238 breaks codex completely.

⚠️  API call failed (attempt 1/3): BadRequestError [HTTP 400]
   🔌 Provider: openai-codex  Model: gpt-5.5
   🌐 Endpoint: https://chatgpt.com/backend-api/codex
   📝 Error: HTTP 400: Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.
   📋 Details: {'message': "Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.", 'type': 'invalid_request_error', 'param': 'tools[15].parameters', 'code': 'invalid_function_parameters'}
⚠️ Non-retryable error (HTTP 400) — trying fallback...
❌ Non-retryable error (HTTP 400): HTTP 400: Invalid schema for function 'memory': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.
❌ Non-retryable client error (HTTP 400). Aborting.
   🔌 Provider: openai-codex  Model: gpt-5.5
   🌐 Endpoint: https://chatgpt.com/backend-api/codex
   💡 This type of error won't be fixed by retrying.
                                                                                                                                         
     Error: Error code: 400 - {'error': {'message': "Invalid schema for function 'memory': schema must have type 'object' and not have                              
     'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.", 'type': 'invalid_request_error', 'param': 'tools[15].parameters', 'code':                             
     'invalid_function_parameters'}}

Steps to Reproduce

  1. Run hermes chat with codex as provider
  2. Try to send a message
  3. Get instant unrecoverable failure

Expected Behavior

The memory tool schema should be valid for codex.

Actual Behavior

The memory tool schema is rejected by codex api.

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

Report       https://paste.rs/D362m
agent.log    https://paste.rs/IjVy5
gateway.log  https://paste.rs/rEJKU

Operating System

macOS 15.7.5

Python Version

3.11.15

Hermes Version

0.12.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

The bug is in hermes-agent/tools/memory_tool.py:563-584

Introduced with PR #21238

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING