DEDUPED Hot AI repos, turned into use cases Get 5 a day

What you can do with Task State Guard

TaskStateGuard is a Python library and CLI that reconciles stuck AI-agent task and delivery states in a local SQLite ledger.

Trended earlier

Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk.

3 use cases

  • Preview restart cleanup of stuck tasks before applying it

    Dry-run a SQLite task ledger, review aggregate counts, then apply timeouts and delivery closures.

    View prompt
    Using the MaxHu-xuan/task-state-guard repo, run the reconcile command with --dry-run against <ledger-path> using --active-grace-seconds 600 and --delivery-grace-seconds 600, then report the aggregate counts. Verify that the output shows dry_run true and applied false before you run any apply step.
  • Record task and delivery closures only from real outcomes

    Write terminal task states and delivery states from a Python worker without guessing success.

    View prompt
    Using the MaxHu-xuan/task-state-guard repo, write a short Python script that creates a task in <ledger-path>, starts it, and closes it as succeeded only after your worker reports success. Verify that you call set_delivery with delivered only after a real transport acknowledgement, and report the final task and delivery states.
  • Check a workflow ledger's health before trusting its history

    Run a counts-only doctor check on a SQLite task ledger and read its exit code.

    View prompt
    Using the MaxHu-xuan/task-state-guard repo, run the doctor command against <ledger-path> and report the aggregate counts and the exit code. Verify that the output contains only counts and no task IDs, prompts, or message bodies.

How to use Task State Guard

  1. Check you have what it needs: CPython 3.11 to 3.14; A SQLite ledger file on a local filesystem, not a network or mapped drive; A virtual environment with task-state-guard installed from PyPI.
  2. Open MaxHu-xuan/task-state-guard on GitHub and read the README and license.
  3. Create and activate a virtual environment, then run python3 -m venv .venv and . .venv/bin/activate.
  4. Install the package with python -m pip install task-state-guard.
  5. Preview the changes with task-state-guard --db ./private-state/tasks.sqlite reconcile --active-grace-seconds 600 --delivery-grace-seconds 600 --dry-run. (inferred, check the README)
  6. Review the returned counts, then apply with task-state-guard --db ./private-state/tasks.sqlite reconcile --active-grace-seconds 600 --delivery-grace-seconds 600. (inferred, check the README)

These steps come from our top use case, Preview restart cleanup of stuck tasks before applying it, which also has a copy-paste agent prompt.

Task State Guard alternatives · Best AI repos for Software and DevOps

About this repo

Requirements

  • CPython 3.11 to 3.14
  • A SQLite ledger file on a local filesystem, not a network or mapped drive
  • A virtual environment with task-state-guard installed from PyPI
Maintain Task State Guard? Add the Featured on Deduped badge

Paste this into your README:

[![Featured on Deduped](https://dedupedai.com/badge/maxhu-xuan-task-state-guard.svg)](https://dedupedai.com/use-cases/maxhu-xuan-task-state-guard/?ref=badge)

More badge styles and HTML

Questions about Task State Guard

What is Task State Guard?

TaskStateGuard is a Python library and CLI that reconciles stuck AI-agent task and delivery states in a local SQLite ledger. It is an open-source project on GitHub: https://github.com/MaxHu-xuan/task-state-guard.

Who is Task State Guard for?

Developers and operators running AI agents, background workers, or local workflows that need to recover task state after a restart or timeout.

What can I do with Task State Guard?

3 use cases so far, for example: Preview restart cleanup of stuck tasks before applying it; Record task and delivery closures only from real outcomes; Check a workflow ledger's health before trusting its history. Each has steps and a copy-paste agent prompt.

What do I need to run Task State Guard?

CPython 3.11 to 3.14; A SQLite ledger file on a local filesystem, not a network or mapped drive; A virtual environment with task-state-guard installed from PyPI.

What are alternatives to Task State Guard?

Other hot AI repos in Software and DevOps: Harness2, iFixAi, Orca, Diagram Design, AI Memory.

Is Task State Guard safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.