 M wrappers/ca.sh
--- diff HEAD ---
diff --git a/wrappers/ca.sh b/wrappers/ca.sh
index a0bb2c6d..8afa6e9f 100755
--- a/wrappers/ca.sh
+++ b/wrappers/ca.sh
@@ -233,6 +233,7 @@ elif grep -qiE 'usage limit|rate.?limit|too many requests|(^|[^0-9])429([^0-9]|$
 else final_rc=3; fi
 if [[ $final_rc -eq 0 && -z "${raw_output//[[:space:]]/}" ]]; then final_rc=3; fi
 echo "=== ca.sh exit=$RC (mapped to contract exit $final_rc) ===" | tee -a "$LOG"
+emit_event_line "$(usage_event_json)"
 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"
@@ -241,5 +242,4 @@ elif [[ $final_rc -eq 0 ]]; then
 else
   printf '{"ok":false,"detail":"cursor-agent failed","session_id":"%s"}\n' "$CHAT_ID" | tee -a "$LOG"
 fi
-emit_event_line "$(usage_event_json)"
 exit "$final_rc"
