archal autoloop connects a harness repo to trace evidence. Hosted database
sources are registered with Archal and processed by hosted workers. Local
trace directories run a local loop and write artifacts under .archal/autoloop/.
Usage
trace-dir is required for local file-backed autoloops. Omit it when using
--source postgres or --source supabase.
Required options
| Option | Description |
|---|---|
--repo <dir> | Harness repository to autoloop |
| Option | Description |
|---|---|
--source <provider> | postgres or supabase |
--database-url-env <name> | Environment variable containing the database URL |
--database-url-secret-ref <ref> | External secret reference for the database URL |
--database-url-env or --database-url-secret-ref.
Source options
| Option | Default | Description |
|---|---|---|
--source-name <name> | Stable display name for the read-only trace source | |
--source-id <uuid> | Optional hosted source UUID; non-UUID values are treated as --source-name for compatibility | |
--trace-table <table> | ai_traces | Trace table |
--span-table <table> | ai_spans | Child span table |
--trace-id-column <column> | id | Trace id column |
--span-id-column <column> | id | Span id column |
--span-trace-id-column <column> | trace_id | Span-to-trace foreign key column |
--parent-span-id-column <column> | Parent span column | |
--trace-updated-at-column <column> | updated_at | Trace update cursor column |
--span-updated-at-column <column> | updated_at | Span update cursor column |
--trace-created-at-column <column> | Trace creation cursor column | |
--span-created-at-column <column> | Span creation cursor column | |
--cursor-mode <mode> | updated_at_id | updated_at_id or created_at_id |
--traces-watermark-at <iso> | Initial trace timestamp cursor | |
--traces-watermark-id <id> | Initial trace id cursor | |
--spans-watermark-at <iso> | Initial span timestamp cursor | |
--spans-watermark-id <id> | Initial span id cursor |
Filters
| Option | Description |
|---|---|
--source-workspace-id <id...> | Import only these source workspace ids |
--source-status <status...> | Import only these source statuses |
--source-trace-group <group...> | Import only these trace groups |
--source-agent-id <id...> | Import only these agent ids |
--source-limit <rows> | Maximum rows to scan per poll |
--source-metadata <key=value...> | Non-secret labels stored with the source |
Execution policy
fix
| Policy | Runs through |
|---|---|
observe | import |
grade | import and grade |
reproduce | import, grade, seed, and reproduce |
fix | full loop, including GitHub issue or PR creation |
Validation
Use--check to validate prerequisites without registering a hosted source or
starting a local loop:
Examples
Register a hosted Supabase source:archal detach applies to local file-backed autoloops. Hosted database
sources are managed by hosted Autoloop workers; local detach does not disable
them.
Output
Hosted database source registration prints:Local artifacts
Local file-backed autoloops write:autoloop-status reads the repo-local ledger for file-backed autoloops
only.
For terminal-first handoffs, pair local artifacts with:
autoloop-status to summarize terminal trace jobs. Use autoloop-reprocess
after fixing the missing evidence, credential, mapping, harness, or GitHub
blocker that caused a trace job to stop.
Exit behavior
archal autoloop exits non-zero when prerequisites fail, source options are
invalid, database credentials are missing or malformed, the repo cannot be
resolved to GitHub where required, or hosted registration fails.
