From ecd561584baa76e9c6f8d2399d044405b9618b1a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Feb 2026 06:23:59 +0000 Subject: [PATCH] fix(daemon): add missing codex.tool_decision event mapping The mapEventName() function was missing a case for "codex.tool_decision", causing these events to pass through unmapped. The server then rejected them with "skipping event with invalid type" because it expects the flat "tool_decision" format, not "codex.tool_decision". https://claude.ai/code/session_01GGSxiNwFb739Q6NXPdhVJ2 --- daemon/aicode_otel_processor.go | 2 ++ daemon/aicode_otel_processor_test.go | 1 + 2 files changed, 3 insertions(+) diff --git a/daemon/aicode_otel_processor.go b/daemon/aicode_otel_processor.go index 26ea727..cf22563 100644 --- a/daemon/aicode_otel_processor.go +++ b/daemon/aicode_otel_processor.go @@ -617,6 +617,8 @@ func mapEventName(name string, source string) string { return model.AICodeEventApiRequest case "codex.api_error": return model.AICodeEventApiError + case "codex.tool_decision": + return model.AICodeEventToolDecision case "codex.exec_command": return model.AICodeEventExecCommand case "codex.conversation_starts": diff --git a/daemon/aicode_otel_processor_test.go b/daemon/aicode_otel_processor_test.go index c1df0d5..7f3b99a 100644 --- a/daemon/aicode_otel_processor_test.go +++ b/daemon/aicode_otel_processor_test.go @@ -247,6 +247,7 @@ func TestMapEventName_Codex(t *testing.T) { {"codex.tool_result", model.AICodeEventToolResult}, {"codex.api_request", model.AICodeEventApiRequest}, {"codex.api_error", model.AICodeEventApiError}, + {"codex.tool_decision", model.AICodeEventToolDecision}, {"codex.exec_command", model.AICodeEventExecCommand}, {"codex.conversation_starts", model.AICodeEventConversationStarts}, {"codex.sse_event", model.AICodeEventSSEEvent},