core/saga-manager

Guides saga lifecycle, crash tracking, and restart backoff for the themis Store.

6|6|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-saga-manager-intent-hq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: core/saga-manager
Source: https://github.com/intent-hq/cloudlands-fe/tree/main/.agents/skills/themis/core/saga-manager
Command: npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-saga-manager-intent-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Redux-saga applications need consistent rules for starting, stopping, and restarting sagas, plus safe handling of crash reports, without leaking package-internal saga-manager APIs into application code. ## Core Features & Use Cases - Lifecycle guidance: Explains how store.runSaga starts sagas, how returned cancel functions and reference counting stop them, and when Store.dispose applies. - Crash report semantics: Documents addCrash/clearCrashes behavior, serialized crash report shape, per-saga retention with MAX_SAGA_CRASH_REPORTS, and omittedCount trimming. - Restart backoff rules: Details getBackOffDelay exponential backoff from 1s up to a 10-minute cap with restart-pressure decay after stable runtime. - Use Case: An agent editing saga-manager docs or code uses this checklist to keep import boundaries intact and avoid documenting internal APIs like @internal_sagaManager as public. ## Quick Start Ask the agent to explain or verify how saga crashes, restarts, and backoff work in the themis Store before editing any saga-manager guidance.

Frequently Asked Questions about core/saga-manager

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I start and stop a saga with store.runSaga?▼

Call store.runSaga(sagaFn) after store.init(); it dispatches startSaga and returns a cancel function that dispatches stopSaga. Overlapping calls for the same saga share one task via reference counting, so the saga stops only after every cancel function is invoked.

How does saga crash restart and backoff work in redux-saga?▼

On an unhandled saga error, autoRestart records the crash, logs it, waits, and restarts the saga. getBackOffDelay computes min(1000 * 2^restarts, 10 minutes), starting at 1s and doubling to the cap, with restart counts decaying one per minute of stable runtime.

Can I use addCrash or clearCrashes as public app APIs?▼

No. addCrash, clearCrashes, reducer state paths, and the reserved @internal_sagaManager name are package-owned internals. App code should only use the public Store facade such as store.runSaga and store.dispose.

Does clearCrashes remove crash reports for all sagas?▼

No. clearCrashes(sagaName) deletes only that saga name's crash entry; reports for other saga names remain. Each entry holds serialized reports plus an omittedCount that grows when older reports are trimmed past MAX_SAGA_CRASH_REPORTS.

When should I use Store.dispose instead of saga cancel functions?▼

Use store.dispose() only for whole-store teardown, since it stops all Store-owned saga tasks. For normal per-mount saga lifetimes, call the cancel function returned by store.runSaga instead of disposing the entire Store context.