backend-reactive-threading

backend-reactive-threading is a cursor rule for Cursor from comet-ml/opik. It costs 0 tokens per session (259 once invoked), scanned A, original, Apache-2.0.

A rule for running blocking and CPU-heavy work on suitable threads in Java reactive code. Reactive code handles results asynchronously, so using the wrong thread can delay unrelated requests.

In plain words
What is it for?
Use it when writing or reviewing Java Mono or Flux chains that access S3, databases, Redis, HTTP services, files, or ClickHouse, and before opening the pull request.
Why use it?
It prevents file, database, network, and other blocking calls from stopping shared reactive threads. It also keeps CPU-heavy work away from threads intended for I/O or client responses.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when writing or reviewing Java Mono or Flux chains that access S3, databases, Redis, HTTP services, files, or ClickHouse, and before opening the pull request.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/comet-ml/opik/backend-reactive-threading
About the project

Opik is an open-source platform for tracing, evaluating, and monitoring applications that use large language models, retrieval systems, or AI agents. Teams use it to inspect agent activity, manage prompts, run evaluations, and monitor these applications in production.

comet-ml/opik · 23,537 stars · on GitHub · comet.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/comet-ml/opik

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backend-reactive-threading

README.md
[![agentmods](https://agentmods.dev/badge/rules/comet-ml/opik/backend-reactive-threading/github.svg)](https://agentmods.dev/rules/comet-ml/opik/backend-reactive-threading)
Your own site
<a href="https://agentmods.dev/rules/comet-ml/opik/backend-reactive-threading"><img src="https://agentmods.dev/badge/rules/comet-ml/opik/backend-reactive-threading/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backend-reactive-threading

Your own site · 80×15
<a href="https://agentmods.dev/rules/comet-ml/opik/backend-reactive-threading"><img src="https://agentmods.dev/badge/rules/comet-ml/opik/backend-reactive-threading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00259
Opus 5.5 $0.00000 $0.00104
Sonnet 5.5 $0.00000 $0.00052
Haiku 4.5 $0.00000 $0.00026

Measured today against content hash 8e0257237af7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

backend-reactive-threading scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/rules/backend-reactive-threading.mdc · 19 lines

What it actually says

Backend Reactive Threading

When writing or reviewing a Mono or Flux chain, load the reactive-threading skill. Before opening the PR, run its "Validate" steps.

  • A blocking or I/O call that returns a plain value (S3 and other AWS SDK calls, JDBI, sync Redisson, @Cacheable getters, sync HTTP, file I/O) runs in its own Offload.blocking(...).
  • CPU that grows with the input runs in Offload.cpu(...), never on boundedElastic or a client thread.
  • Per-item blocking on a Flux (chunk writes, per-item S3 or lookups): one Offload.blockingEach(...) right before it.
  • Never block on ClickHouseWorker, chc-operation, redisson-netty or parallel; block() only at the edge.
  • An entry point (resource, job, subscriber, listener) runs its chain on its own scheduler and records it with Offload.originalOn.
  • Light work gets no hop.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 19 lines · 0 tokens per session scan A 8e0257237af7

Subscribe to this mod's changes

backend-reactive-threading is a cursor rule published in the GitHub repository comet-ml/opik (23,537 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 259 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-12-02.

Related

backend-reactive-threading compared with cursor rules from other repositories

backend-reactive-threading next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
backend-reactive-threadingcomet-ml/opikCursor rule24ktodayApache-2.0A0Cursor
gatewaycoddy-project/coddy-agentCursor rule215todayMITA0Cursor
e2e-testingelie222/inbox-zeroCursor rule13ktodaynoneA0Cursor
code-stylecoddy-project/coddy-agentCursor rule215todayMITA366Cursor
mcp-debugginggiantswarm/mcp-debugCursor rule39todayApache-2.0A0Cursor
vibes-plug-backendroedyrustam/vibes-plugCursor rule1315d agoMITA0Cursor
js-sdk-genai-instrumentationopenlit/openlitCursor rule3.1ktodayApache-2.0A0Cursor