IssueLoop needs somewhere to persist tickets between the triage step and the fix step — which may happen minutes, hours, or pipeline runs apart. Two backends are available: a local SQLite file that requires zero setup and is ideal for single-machine workflows, and a Supabase-hosted database for multi-process pipelines, parallel CI agents, or any scenario where more than one process needs to read and write tickets concurrently.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/onenot8/issueLoop/llms.txt
Use this file to discover all available pages before exploring further.
Local SQLite (default)
SQLite is the default backend. If you never callissueloop.use(), or if you call it without a database argument, IssueLoop creates data/issueloop.db in the IssueLoop working directory and applies the schema automatically on first connection — no migration tooling required.
parents=True, so any missing parent directories are created automatically. Schema migrations are also applied at connection time: new columns (attempts, escalation_summary, proposed_fix, dispensed_at) are added with ALTER TABLE if they are missing, which means an existing database from an older version upgrades automatically.
Tickets are dispensed in priority order. The dispense_next call (used by get_top_error) sorts candidates by this order before returning the first one:
| Priority | Sort key |
|---|---|
blocking | 0 |
high | 1 |
normal | 2 |
low | 3 |
created_at ascending — oldest first.
Supabase
Supabase provides a hosted Postgres database accessible over HTTP. Switch to it by changing thedatabase argument; every other IssueLoop function works identically.
.example.env to .env and fill in your project credentials:
load_dotenv() automatically when the Supabase backend initialises, so a .env file in your working directory is sufficient. If SUPABASE_URL or SUPABASE_KEY is missing at initialisation time, IssueLoop raises a RuntimeError with instructions.
Create the tickets table using the SQL schema at sql/ticket_table.sql in the IssueLoop repository. Run it once against your Supabase project using the SQL editor or the Supabase CLI before your first run.
Retention and cleanup
IssueLoop does not grow the database indefinitely. Theretention_days config option (default 30) controls how far back completed and failed tickets are kept. Pass it to issueloop.use():
Database stats and export
Inspect the current state of the database without iterating over individual tickets:db_size_bytes is included when the local SQLite backend is active; it is omitted for Supabase.
Export all tickets to a JSON file for backup or external reporting:
get_all_bugs.
Stale ticket reaping
When a ticket is dispensed viaget_top_error, it is marked in_progress and its dispensed_at timestamp is recorded. If the worker that claimed the ticket crashes or times out before calling resolve or fail, the ticket remains stuck in in_progress indefinitely.
reap_stale_bugs finds tickets that have been in_progress for longer than the given threshold and resets them to pending, making them available for the next get_top_error call:
reap_stale_bugs periodically — for example, at the start of each batch run — to ensure your queue does not fill up with stuck tickets.