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.
npx agentmods add rules/learnwithcc/tally-mcp/long_running_tasksgit clone --depth 1 https://github.com/learnwithcc/tally-mcpWrote 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.
[](https://agentmods.dev/rules/learnwithcc/tally-mcp/long_running_tasks)<a href="https://agentmods.dev/rules/learnwithcc/tally-mcp/long_running_tasks"><img src="https://agentmods.dev/badge/rules/learnwithcc/tally-mcp/long_running_tasks.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00781 |
| Opus 5 | $0.00000 | $0.00391 |
| Sonnet 5 | $0.00000 | $0.00156 |
| Haiku 4.5 | $0.00000 | $0.00078 |
Grade A, and why
long_running_tasks 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 4d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Handling Long-Running Processes in Cursor
To avoid connection failed or timeout errors during long-running operations like performance tests, builds, or complex tool calls, follow these guidelines.
1. Acknowledge Cursor's Timeout Limits
- Fixed Timeouts: Cursor imposes a non-configurable timeout on tool calls and other background processes initiated from chat. This can be as short as 5 seconds.
- No User Control: There is currently no setting to extend this timeout.
2. Best Practices for Long-Running Tasks
-
Break Down Tasks: Sub-divide long processes into smaller chunks.
- Target Duration: Aim for each chunk to complete in under 5 seconds to be safe.
- Example (Artillery): Instead of one long test, run multiple short tests targeting specific phases or scenarios.
-
Kill Previous Processes: Before starting a new instance of a server or long-running task, always ensure the previous one is terminated to avoid port conflicts (
EADDRINUSE).- Command: Use
kill $(lsof -t -i:<port>) 2>/dev/null || trueto gracefully kill any process on a given port.
- Command: Use
-
Execute Externally (If Necessary): For tasks that cannot be broken down (e.g., a full production build), the best practice is to run them in a separate, dedicated terminal outside of the agent's control and then report the results back.
-
Provide Feedback: Continue to report when timeouts occur, as this helps refine our internal best practices and provides data for potential future feature requests to the Cursor team.
3. Primary Strategy: Decompose and Conquer
- Break Down Tasks: The most effective strategy is to break down long-running commands into smaller, incremental steps that can each complete within the timeout window.
- Example (Artillery): Instead of running a full 10-minute test suite, run a single, short scenario first to verify configuration. Then, run shorter phases of the test separately.
# Instead of this: npx artillery run long-test-suite.yml # Do this: # Step 1: Verify a single scenario npx artillery run --scenario "Quick Smoke Test" test-suite.yml # Step 2: Run a shorter phase npx artillery run --phase "Warm-up" test-suite.yml - Example (Builds/Tests): Instead of running
npm test, run tests for a specific file or component:jest src/components/MyComponent.test.ts.
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.
- 4d ago First seen · 56 lines · 0 tokens per session scan A a9e4aec008a4
long_running_tasks is a cursor rule published in the GitHub repository learnwithcc/tally-mcp (8 stars, last pushed 1y ago), licensed ISC. It costs nothing until one of its globs matches a file; then it loads 781 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-08-31.
Other cursor rules, from other repositories
upgrade-tests
// ✅ CORRECT: Upgrade package pattern await using ctx = testReactResource(appRouter, { server: { // server configuration }, client(opts) { return { links: [ httpLink({ url: opts.httpUrl, // client configuration }), ], }; }, }).
test-running
When running tests, use the --watch false flag to avoid watch mode.
middleware
When you need create a middleware to protect some page of Next.js app.
memory
Establishes a persistent memory protocol for capturing and retrieving knowledge, including storage strategies, context retrieval, and proactive memory management for continuous learning.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.