Repository navigation
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/6e23d0d7-dc4e-4774-8931-9538aec5a0af Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…erns Agent-Logs-Url: https://github.com/github/gh-aw/sessions/6e23d0d7-dc4e-4774-8931-9538aec5a0af Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add structured output mode for agent responses
feat: structured-output mode for Codex engine via --output-schema
May 1, 2026
Collaborator
|
@copilot make it work for imported shared agentic workflow |
…flows Agent-Logs-Url: https://github.com/github/gh-aw/sessions/031e58c6-97c8-4e84-aae9-e7e43eeb597a Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Done in df742e0. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agentic workflows produce freeform text, forcing downstream jobs to parse unstructured LLM output—fragile and non-deterministic. This adds a
structured-outputfrontmatter field that constrains the Codex agent's final response to a declared JSON Schema, passed natively via the Codex CLI's--output-schema <FILE>flag.Scope: Codex only (native support via
--output-schema); compile-time error raised for all other engines.Frontmatter
Two mutually exclusive options:
structured-outputcan also be declared in a shared workflow and inherited by any importing workflow (first-wins from imports; main workflow takes precedence).Implementation
StructuredOutputConfig— new struct infrontmatter_types.gowithschema(inlinemap[string]any) andschema-file(repo-relative path) fields; wired intoFrontmatterConfigandWorkflowDatacompiler_orchestrator_workflow.gopopulatesWorkflowData.StructuredOutputfrom raw frontmatter, falling back toimportsResult.MergedStructuredOutputwhen not defined in the main workflowimport_field_extractor.goextractsstructured-outputfrom each imported file (first-wins);ImportsResult.MergedStructuredOutputcarries the value to the compilermain_workflow_schema.jsonupdated withstructured-outputproperty (rebuild required since schemas are embedded)structured_output_validation.goenforces: Codex-only, exactly one ofschema/schema-filemust be present (applies whether the config comes from the main workflow or an import)codex_engine.goinjects--output-schemainto thecodex execcommand:/tmp/gh-aw/output-schema.jsonat runtime (avoids shell quoting issues with arbitrary JSON)--output-schema "$GITHUB_WORKSPACE/<path>"directly