Skip to content

Commit ebb98d5

Browse files
fix: add is_mcp_tool_approval marker
1 parent acf3fa6 commit ebb98d5

4 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/CodexElicitationHandler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export class CodexElicitationHandler implements ElicitationHandler {
165165
// content: [messageContent], — omitted: already rendered via item/started
166166
// rawInput: { ... } — omitted: same reason
167167
},
168+
_meta: { is_mcp_tool_approval: true },
168169
options,
169170
},
170171
correlatedCallId,
@@ -180,6 +181,7 @@ export class CodexElicitationHandler implements ElicitationHandler {
180181
content: [messageContent],
181182
rawInput: { serverName: params.serverName, schema: params.requestedSchema },
182183
},
184+
...(isToolApproval ? { _meta: { is_mcp_tool_approval: true } } : {}),
183185
options,
184186
},
185187
correlatedCallId: undefined,

src/__tests__/CodexACPAgent/data/elicitation-tool-approval-all-persist.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
}
2525
}
2626
},
27+
"_meta": "_meta",
2728
"options": [
2829
{
2930
"optionId": "allow_once",

src/__tests__/CodexACPAgent/data/elicitation-tool-approval-no-persist.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
}
2525
}
2626
},
27+
"_meta": "_meta",
2728
"options": [
2829
{
2930
"optionId": "allow_once",

src/__tests__/CodexACPAgent/data/elicitation-tool-approval-session-only.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
}
2525
}
2626
},
27+
"_meta": "_meta",
2728
"options": [
2829
{
2930
"optionId": "allow_once",

0 commit comments

Comments
 (0)