 M wrappers/ca.sh
--- diff HEAD ---
diff --git a/wrappers/ca.sh b/wrappers/ca.sh
index a0bb2c6d..a422374e 100755
--- a/wrappers/ca.sh
+++ b/wrappers/ca.sh
@@ -237,9 +237,13 @@ if [[ $final_rc -eq 75 ]]; then
   emit_event_line '{"kind":"error","subtype":"rate_limited","error":{"code":"rate_limit","message":"cursor-agent quota exhausted","errorKind":"quota"}}'
   printf '{"ok":false,"detail":"rate-limited"}\n' | tee -a "$LOG"
 elif [[ $final_rc -eq 0 ]]; then
-  printf '{"ok":true,"detail":"cursor-agent completed","session_id":"%s"}\n' "$CHAT_ID" | tee -a "$LOG"
+  STATUS_JSON="$(printf '{"ok":true,"detail":"cursor-agent completed","session_id":"%s"}' "$CHAT_ID")"
 else
-  printf '{"ok":false,"detail":"cursor-agent failed","session_id":"%s"}\n' "$CHAT_ID" | tee -a "$LOG"
+  STATUS_JSON="$(printf '{"ok":false,"detail":"cursor-agent failed","session_id":"%s"}' "$CHAT_ID")"
+fi
+if [[ -n "${STATUS_JSON:-}" ]]; then
+  printf '%s\n' "$STATUS_JSON" | tee -a "$LOG"
+  emit_event_line "$(usage_event_json)"
+  printf '%s\n' "$STATUS_JSON"
 fi
-emit_event_line "$(usage_event_json)"
 exit "$final_rc"
