Daemon and background work
What agent-qa does after a run, where unfinished work waits, who finishes it, and the optional daemon.
After every run, agent-qa analyzes it and learns from it. Most of the time this finishes inside the agent-qa run process and you never think about it. This page is for when it does not.
After a run
When a run has its verdict, agent-qa queues a chain of three jobs:
analyze-rungives each failure a root cause.curate-memoryturns the run's evidence into knowledge.propose-improvementsruns extra checks on new knowledge when an eval corpus exists.
The run works through the chain for up to 60 seconds, then exits. The verdict and exit code are fixed before the chain starts, so nothing here can change them. The run prints the state of each stage on stderr, such as analysis: complete · curation: complete.
Each stage reads pending, running, complete, failed or skipped. agent-qa digest <runId> and the dashboard's run page show the same states later.
Unfinished work
Work left when the minute is up, or when you ran with --detach, stays queued on this machine:
- The next local run finishes it. Every
agent-qa runwithout--detachalso picks up earlier runs whose curation never finished. agent-qa knowledge drainfinishes queued curation now, using fixed templates instead of a model.--statusonly reports what is left.
The queues are local files. On a CI runner or any machine that is thrown away, unfinished work goes with it.
The daemon
npx agent-qa daemonThe daemon is an optional background host that runs in the foreground of its terminal. It finishes queued analysis jobs as they arrive, and it serves agent-qa functions to commands that pass --via-daemon. It needs a working model credential to start.
| Command | What it does |
|---|---|
agent-qa daemon status | Shows whether it is running, its uptime and how much curation is waiting. --json prints the raw status. |
agent-qa daemon stop | Stops the running daemon. |
Restart the daemon, and any long-running dashboard, after you upgrade agent-qa.
Three queues
agent-qa keeps three separate queues. Messages and commands always name which one they mean.
| Queue | Holds | Lives in | Commands |
|---|---|---|---|
| Run queue | Test runs started from the dashboard | The dashboard's database | agent-qa queue list, queue cancel |
| Curation queue | Knowledge work from finished runs | agent-qa-knowledge/memory/queue/ | agent-qa knowledge drain |
| Agent job queue | The post-run jobs above | .agent-qa/agent-jobs.db | agent-qa agent-jobs … |
Agent jobs
| Command | What it does |
|---|---|
agent-qa agent-jobs list | Lists every job with its kind, status, attempts and run, without payloads. |
agent-qa agent-jobs pump --only <kind> | Works through one kind of job now, leaving the others queued. |
agent-qa agent-jobs cancel <jobId> | Asks a job to stop. |
agent-qa agent-jobs requeue <jobId> | Returns a finished, failed or cancelled job to the queue, forgetting its previous attempt. Run pump afterwards. |
Jobs retry on their own: analysis and curation up to three times, proposals twice. If analysis keeps failing, the chain carries on with an unknown root cause.
If the job store is refused
The job database is stamped with its format version, and agent-qa refuses one from another version instead of guessing. To reset it, stop agent-qa and delete .agent-qa/agent-jobs.db, its -wal and -shm files, and .agent-qa/agent-jobs/checkpoints/. Recorded runs, their evidence and your knowledge live elsewhere and are not affected.