Error AI_NoObjectGeneratedError response did not match schema for opencode create agent #1361

Closed
opened 2026-02-16 17:30:37 -05:00 by yindo · 5 comments
Owner

Originally created by @wreed4 on GitHub (Aug 18, 2025).

Originally assigned to: @thdxr on GitHub.

I'm having trouble generating a custom agent using opencode agent create with the following error:

ERROR 2025-08-18T15:51:38 +86ms service=default name=AI_NoObjectGeneratedError message=No object generated: response did not match schema. cause=AI_TypeValidationError: Type validation failed: Value: {}.
Error message: [
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [
      "identifier"
    ],
    "message": "Required"
  },
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [
      "whenToUse"
    ],
    "message": "Required"
  },
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "undefined",
    "path": [
      "systemPrompt"
    ],
    "message": "Required"
  }
] fatal

This seems intermittent with some agent descriptions, but it seems to be incredibly consistent with this description

Role: The Critical Agent acts as a quality assurance and intellectual sparring partner. Its primary
goal is to identify gaps, unanswered questions, and logical inconsistencies in architectural
documentation. It operates in a perpetual state of inquiry, probing for weak points and areas of
ambiguity until a predefined "satisfaction threshold" is met. Purpose: To challenge assumptions and
ensure architectural decisions are robust, well-reasoned, and comprehensively documented. Behavioral
Directives: Question-Centric: Focus exclusively on asking questions. Never provide answers or make
statements. Gap-Finding: Scrutinize documents for missing information, unstated assumptions, and
undocumented rationale. Placeholder Awareness: Be specifically aware of and actively call out the syntax
used by the Author Agent to denote sections requiring human input (e.g., [HUMAN INPUT REQUIRED:
$TOPIC]). Your critique should highlight these sections to prevent them from being accidentally merged.
Iterative Inquiry: Continue asking questions until the document appears to be logically sound and all
initial ambiguities are addressed. Your final output should be a single, consolidated list of questions.
Example Questions: "What are the anticipated long-term maintenance costs of this solution?" "Does this
decision introduce a new single point of failure?" "How will this change affect our existing disaster
recovery plan?" "What security implications were considered for this implementation?"
Originally created by @wreed4 on GitHub (Aug 18, 2025). Originally assigned to: @thdxr on GitHub. I'm having trouble generating a custom agent using `opencode agent create` with the following error: ``` ERROR 2025-08-18T15:51:38 +86ms service=default name=AI_NoObjectGeneratedError message=No object generated: response did not match schema. cause=AI_TypeValidationError: Type validation failed: Value: {}. Error message: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "identifier" ], "message": "Required" }, { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "whenToUse" ], "message": "Required" }, { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "systemPrompt" ], "message": "Required" } ] fatal ``` This seems intermittent with some agent descriptions, but it seems to be incredibly consistent with this description ``` Role: The Critical Agent acts as a quality assurance and intellectual sparring partner. Its primary goal is to identify gaps, unanswered questions, and logical inconsistencies in architectural documentation. It operates in a perpetual state of inquiry, probing for weak points and areas of ambiguity until a predefined "satisfaction threshold" is met. Purpose: To challenge assumptions and ensure architectural decisions are robust, well-reasoned, and comprehensively documented. Behavioral Directives: Question-Centric: Focus exclusively on asking questions. Never provide answers or make statements. Gap-Finding: Scrutinize documents for missing information, unstated assumptions, and undocumented rationale. Placeholder Awareness: Be specifically aware of and actively call out the syntax used by the Author Agent to denote sections requiring human input (e.g., [HUMAN INPUT REQUIRED: $TOPIC]). Your critique should highlight these sections to prevent them from being accidentally merged. Iterative Inquiry: Continue asking questions until the document appears to be logically sound and all initial ambiguities are addressed. Your final output should be a single, consolidated list of questions. Example Questions: "What are the anticipated long-term maintenance costs of this solution?" "Does this decision introduce a new single point of failure?" "How will this change affect our existing disaster recovery plan?" "What security implications were considered for this implementation?" ```
yindo closed this issue 2026-02-16 17:30:37 -05:00
Author
Owner

@wreed4 commented on GitHub (Aug 18, 2025):

it seems less likely to occur with shorter descriptions..

@wreed4 commented on GitHub (Aug 18, 2025): it seems less likely to occur with shorter descriptions..
Author
Owner

@rekram1-node commented on GitHub (Aug 18, 2025):

This is due to the LLM failing to output data in the schema we want, I think the error message could be prettier tho

@rekram1-node commented on GitHub (Aug 18, 2025): This is due to the LLM failing to output data in the schema we want, I think the error message could be prettier tho
Author
Owner

@wreed4 commented on GitHub (Aug 18, 2025):

yeah, I figured. but that should be forcible. This should be using Sonnet 4, so it should be more than capable of structured output.

@wreed4 commented on GitHub (Aug 18, 2025): yeah, I figured. but that should be forcible. This should be using Sonnet 4, so it should be more than capable of structured output.
Author
Owner

@rekram1-node commented on GitHub (Aug 18, 2025):

yeah we should try to use the smartest model you have access to or something, I haven't looked at the default

@rekram1-node commented on GitHub (Aug 18, 2025): yeah we should try to use the smartest model you have access to or something, I haven't looked at the default
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1361