You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 26ec331
Browse filesBrowse the repository at this point in the historyBrowse files
fix(codex): preserve native agent model settings (#3150)
Preserve authored string model and model_reasoning_effort settings as top-level Codex TOML keys, leaving omitted settings absent. Warn safely about unsupported or invalid metadata without exposing values. Add regression coverage and document the bounded behavior and proposed specification amendment.
Fixes#3126.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .agents/skills/apm-spec-guardian/assets/synthesizer-return-schema.json
+18-15Lines changed: 18 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -93,21 +93,7 @@
93
93
"defer_v0_2": {
94
94
"type": "array",
95
95
"description": "Architectural work bound to a reserved slot in a future major. Each entry MUST cite the existing reserved-slot section anchor in the artifact (e.g. 'sec.4.8 workspaces reserved', 'sec.10.12 publisher attestations reserved').",
96
-
"items": {
97
-
"allOf": [
98
-
{ "$ref": "#/definitions/fold_item" },
99
-
{
100
-
"type": "object",
101
-
"required": ["reserved_slot_anchor"],
102
-
"properties": {
103
-
"reserved_slot_anchor": {
104
-
"type": "string",
105
-
"description": "Section / anchor in the current artifact that already reserves space for this work."
"patch_instruction": { "type": "string", "description": "Concrete mechanical instruction the drafter applies. ASCII only. MUST NOT add any forbidden vendor / foundation token to the artifact." },
"description": "Same shape as fold_item plus a required reserved_slot_anchor. Inlined (not composed via allOf over fold_item) because Draft 7 has no unevaluatedProperties: an allOf branch's own additionalProperties:false would otherwise reject the sibling branch's reserved_slot_anchor key. The five base properties are intentionally duplicated here, not $ref-shared, to keep this a single closed object; test_shared_fold_item_properties_structurally_identical guards against the two copies drifting apart.",
"theme": { "type": "string", "description": "Convergent-theme id this fold addresses (e.g. T1, T2), or 'standalone' if not part of a clustered theme." },
146
+
"spec_section": { "type": "string", "description": "Section / appendix / req-XXX anchor where the patch lands." },
147
+
"patch_instruction": { "type": "string", "description": "Concrete mechanical instruction the drafter applies. ASCII only. MUST NOT add any forbidden vendor / foundation token to the artifact." },
Copy file name to clipboardExpand all lines: .apm/skills/apm-spec-guardian/assets/synthesizer-return-schema.json
+18-15Lines changed: 18 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -93,21 +93,7 @@
93
93
"defer_v0_2": {
94
94
"type": "array",
95
95
"description": "Architectural work bound to a reserved slot in a future major. Each entry MUST cite the existing reserved-slot section anchor in the artifact (e.g. 'sec.4.8 workspaces reserved', 'sec.10.12 publisher attestations reserved').",
96
-
"items": {
97
-
"allOf": [
98
-
{ "$ref": "#/definitions/fold_item" },
99
-
{
100
-
"type": "object",
101
-
"required": ["reserved_slot_anchor"],
102
-
"properties": {
103
-
"reserved_slot_anchor": {
104
-
"type": "string",
105
-
"description": "Section / anchor in the current artifact that already reserves space for this work."
"patch_instruction": { "type": "string", "description": "Concrete mechanical instruction the drafter applies. ASCII only. MUST NOT add any forbidden vendor / foundation token to the artifact." },
"description": "Same shape as fold_item plus a required reserved_slot_anchor. Inlined (not composed via allOf over fold_item) because Draft 7 has no unevaluatedProperties: an allOf branch's own additionalProperties:false would otherwise reject the sibling branch's reserved_slot_anchor key. The five base properties are intentionally duplicated here, not $ref-shared, to keep this a single closed object; test_shared_fold_item_properties_structurally_identical guards against the two copies drifting apart.",
"theme": { "type": "string", "description": "Convergent-theme id this fold addresses (e.g. T1, T2), or 'standalone' if not part of a clustered theme." },
146
+
"spec_section": { "type": "string", "description": "Section / appendix / req-XXX anchor where the patch lands." },
147
+
"patch_instruction": { "type": "string", "description": "Concrete mechanical instruction the drafter applies. ASCII only. MUST NOT add any forbidden vendor / foundation token to the artifact." },
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Changed
11
+
12
+
-`docs/src/content/docs/specs/openapm-v0.1.md` adds proposed `req-tg-015` for Codex-native `model`/`model_reasoning_effort` preservation and bounded dropped-metadata diagnostics. (#3150)
13
+
14
+
### Fixed
15
+
16
+
- Codex agent conversion preserves native `model` and `model_reasoning_effort` settings and warns about dropped metadata instead of silently losing it. (#3150)
Copy file name to clipboardExpand all lines: docs/public/specs/manifests/openapm-v0.1.requirements.yml
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -460,6 +460,11 @@ requirements:
460
460
section: "8.5.8"
461
461
conformance_class: consumer
462
462
notes: "user-scoped MCP target selection uses a disclosed versioned capability contract, ignores project-only detection signals, applies first-source precedence without fallback, filters mixed sets, and refuses zero-supported selections before user manifest, lockfile, or target-config mutation"
463
+
- id: req-tg-015
464
+
keyword: MUST
465
+
section: "8.5.1"
466
+
conformance_class: consumer
467
+
notes: "a conforming consumer providing the Codex-native agent conversion capability preserves a source-declared model or model_reasoning_effort string value in its native top-level placement, leaves either field absent when absent from the source, diagnoses a non-string source value by field name without including that value, and emits a diagnostic bounded on dropped-field count (at least one shown when any are dropped), per-field name length, and ASCII-sanitized field-name display (never the value) for any other dropped, non-capability-restriction frontmatter field"
Copy file name to clipboardExpand all lines: docs/src/content/docs/producer/author-primitives/instructions-and-agents.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,6 +168,7 @@ for...
168
168
|`name`| recommended | Display name; defaults to filename stem |
169
169
|`description`| yes | Used by Cascade and Copilot to decide when to surface the agent |
170
170
|`model`| optional | Pinned model the harness should switch to when invoked |
171
+
|`model_reasoning_effort`| optional | Native Codex reasoning effort, supplied as a string |
171
172
|`tools`| optional | Whitelist of tools the persona may call |
172
173
|`color`| optional | Display color for harnesses that render it (Copilot, Claude, OpenCode). OpenCode requires a `#rgb`/`#rrggbb` hex literal or one of its theme names; see "Common pitfalls" below |
173
174
|`handoffs`| optional | List of agent names (or VS Code structured handoff objects) this agent can hand off to |
@@ -182,9 +183,21 @@ of the supported capability tags (`read`, `write`, `shell`, `web`,
182
183
`*`). If any unsupported tag is present, the agent is not deployed at
183
184
all -- APM fails closed. Kiro may warn and fall back if the specified
184
185
`model` is unavailable; APM passes the value through without
185
-
validation. Codex translates only `name`, `description`, and the
186
-
Markdown body; APM does not yet generate the complete per-agent MCP
187
-
transport definitions needed to preserve `model` or `tools`. When
186
+
validation.
187
+
188
+
Codex receives `name`, `description`, and the Markdown body as
189
+
`developer_instructions`. Supplied string values for `model` and
190
+
`model_reasoning_effort` become top-level keys in the generated agent TOML,
191
+
as documented in the [Codex custom agent format](https://developers.openai.com/codex/subagents/#custom-agents).
192
+
Omitted fields remain absent; APM does not translate model names, choose
193
+
defaults, or validate which models and effort values your Codex supports.
194
+
Non-string values are dropped with a warning naming the field.
195
+
196
+
Other frontmatter fields are dropped with a warning that APM does not
197
+
translate them for Codex. This includes other native Codex settings and
198
+
any `codex:` block; there is no namespaced or arbitrary passthrough.
199
+
Remove unnecessary fields, or do not rely on their settings in the
200
+
generated agent. APM still cannot preserve `tools` restrictions. When
188
201
`tools` is present, `apm install` warns that the generated agent may
189
202
inherit every project or session MCP server. Remove `tools` if
190
203
unrestricted access is intentional; otherwise, do not use the
@@ -222,7 +235,7 @@ offending package and field so you can fix the source.
0 commit comments