﻿# Resetting a Dagster cursor does not reset run keys

Dagster sensor cursors track scan progress while run keys prevent duplicate run creation; resetting a cursor alone does not relaunch requests with previously used keys.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-dagster-sensor-cursor-run-key/
Language: en

## Follow a file revision through the sensor

A sensor scans incoming documents and requests an analysis run for each new revision. Dagster's [sensor guide](https://dagster.io/docs/guides/automate/sensors) uses a cursor to retain scan progress and a run key to identify a requested execution. These values solve different problems. The cursor can avoid repeatedly listing old observations, while the run key prevents repeated requests for the same identified work from creating duplicate runs.

## Choose the unit represented by a run key

The [RunRequest reference](https://dagster.io/docs/api/dagster/schedules-sensors) defines sensor run-key deduplication across evaluations. A filename-only key treats later versions of that filename as the same requested work. A revision-bearing key can distinguish changed content, provided the revision source actually captures the changes that matter. Decide whether work represents a path, an immutable source revision or a deliberate analysis campaign before selecting the key format.

## Understand why resetting progress can appear ineffective

The guide explicitly warns that resetting a cursor does not launch new runs when associated run keys remain unchanged. Rescanning the same files can therefore work correctly while run creation is skipped. Inspect both stages before blaming a broken cursor. A manual replay procedure should state whether it only repeats discovery or also creates intentionally new work; those are different operations with different effects on external analysis services.

## Preserve the deduplication tradeoff

The guide notes that omitting run keys permits cursor reset to cause fresh requests. That also removes the run-key protection against duplicate creation across ordinary evaluations. Do not disable deduplication merely to make a recovery demonstration look successful. If replay has a distinct business meaning, design its identity deliberately and account for the extra runs. [Task budgets](/journal/learn-codex-task-budgets/) connect this choice to the actual work being authorized.

## Read ticks and runs together

The [webserver reference](https://dagster.io/docs/guides/operate/webserver) describes recent sensor ticks, related runs and previewing a tick result. Use those views to distinguish evaluation, skip decisions and created executions. [Tool observations](/journal/learn-codex-tool-observation/) can preserve the file revision, cursor and requested key in the same investigation. A successful rescan with no new run can then be explained as deduplication, rather than incorrectly reported as either missing source data or a completed analysis.
