Skip to content

Commit 2166ccb

Browse files
committed
tweaks
1 parent 67873a6 commit 2166ccb

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

cli/src/utils/implementor-helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const getImplementorDisplayName = (
3535
) {
3636
baseName = 'Opus'
3737
} else if (agentType.includes('editor-implementor2-gpt-5')) {
38-
baseName = 'GPT-5'
38+
baseName = 'GPT-5.2'
3939
} else if (agentType.includes('editor-implementor2-sonnet')) {
4040
baseName = 'Sonnet'
4141
// Then check editor-implementor-* patterns (less specific)
@@ -44,7 +44,7 @@ export const getImplementorDisplayName = (
4444
} else if (agentType.includes('editor-implementor-gemini')) {
4545
baseName = 'Gemini'
4646
} else if (agentType.includes('editor-implementor-gpt-5')) {
47-
baseName = 'GPT-5.2'
47+
baseName = 'GPT-5'
4848
} else if (agentType.includes('editor-implementor')) {
4949
baseName = 'Sonnet'
5050
}

packages/agent-runtime/src/tools/tool-executor.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -401,27 +401,11 @@ export async function executeCustomToolCall(
401401
},
402402
autoInsertEndStepParam,
403403
})
404-
if ('error' in toolCall) {
405-
const toolResult: ToolMessage = {
406-
role: 'tool',
407-
toolName,
408-
toolCallId: toolCall.toolCallId,
409-
content: jsonToolResult({
410-
errorMessage: toolCall.error,
411-
}),
412-
}
413-
toolResults.push(cloneDeep(toolResult))
414-
toolResultsToAddAfterStream.push(cloneDeep(toolResult))
415-
logger.debug(
416-
{ toolCall, error: toolCall.error },
417-
`${toolName} error: ${toolCall.error}`,
418-
)
419-
return previousToolCallFinished
420-
}
421404

422405
// Filter out restricted tools - emit error instead of tool call/result
423406
// This prevents the CLI from showing tool calls that the agent doesn't have permission to use
424407
if (
408+
toolCall.toolName &&
425409
!(agentTemplate.toolNames as string[]).includes(toolCall.toolName) &&
426410
!fromHandleSteps &&
427411
!(
@@ -438,6 +422,24 @@ export async function executeCustomToolCall(
438422
return previousToolCallFinished
439423
}
440424

425+
if ('error' in toolCall) {
426+
const toolResult: ToolMessage = {
427+
role: 'tool',
428+
toolName,
429+
toolCallId: toolCall.toolCallId,
430+
content: jsonToolResult({
431+
errorMessage: toolCall.error,
432+
}),
433+
}
434+
toolResults.push(cloneDeep(toolResult))
435+
toolResultsToAddAfterStream.push(cloneDeep(toolResult))
436+
logger.debug(
437+
{ toolCall, error: toolCall.error },
438+
`${toolName} error: ${toolCall.error}`,
439+
)
440+
return previousToolCallFinished
441+
}
442+
441443
// Only emit tool_call event after permission check passes
442444
onResponseChunk({
443445
type: 'tool_call',

0 commit comments

Comments
 (0)