Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(errors): facts_drain_job_failed points the agent at doctor facts_drain
garrytan184a195f34bf
diff --git a/docs/guides/error-codes.md b/docs/guides/error-codes.mdindex 740ca2a05f..c82d04de7e 100644--- a/docs/guides/error-codes.md+++ b/docs/guides/error-codes.md@@ -763,7 +763,7 @@ More: [docs/guides/facts-drain.md#deferrals](../../docs/guides/facts-drain.md#de| Meaning | Why | Next step | Who acts · consent | Verify | Exit | Retryable ||---|---|---|---|---|---|---|-| A facts-absorb job failed inside the automatic facts drain; it retries with backoff until its attempts run out. | The server failed; this is not a caller mistake. | Server-side failure, not a caller mistake. Run `gbrain doctor --json` on the brain host; if it repeats, report it to the user. | host_admin | `gbrain doctor --json` | 1 | no |+| A facts-absorb job failed inside the automatic facts drain; it retries with backoff until its attempts run out. | The server failed; this is not a caller mistake. | Read doctor `facts_drain`: its message names the cause and its fix the next step (raising a spend cap is paid; ask the user first). Run: gbrain doctor --only facts_drain --json | agent | `gbrain doctor --json` | 1 | no |More: [docs/guides/facts-drain.md#deferrals](../../docs/guides/facts-drain.md#deferrals)diff --git a/src/core/error-registry.ts b/src/core/error-registry.tsindex fccfa64b24..1877bdd83a 100644--- a/src/core/error-registry.ts+++ b/src/core/error-registry.ts@@ -132,7 +132,7 @@ export const CODES = {fact_not_found: { class: 'caller', summary: "Fact not found." },facts_absorb_write_refused: { class: 'caller', summary: "Facts absorb refused the write." },facts_drain_deferred: { class: 'unavailable', summary: "The automatic facts drain left queued facts-absorb jobs waiting; `reason` says why and `fix`, when present, is the next step. Nothing is dropped: the jobs run on a later drain.", reasons: ['no_key', 'extraction_unavailable', 'budget_exhausted', 'daily_budget_exhausted', 'job_over_budget', 'no_pricing', 'provider_halted', 'drain_error'], docs: 'docs/guides/facts-drain.md#deferrals', suggestion: 'Read doctor `facts_drain`: its message names the cause and its fix the next step (raising a spend cap is paid; ask the user first).', fix: { argv: ['gbrain', 'doctor', '--only', 'facts_drain', '--json'], consent: [], actor: 'agent', why: 'Shows the drain status, the backlog and the last error with its fix.', requires_exclusive: false } },- facts_drain_job_failed: { class: 'server', summary: "A facts-absorb job failed inside the automatic facts drain; it retries with backoff until its attempts run out.", docs: 'docs/guides/facts-drain.md#deferrals' },+ facts_drain_job_failed: { class: 'server', summary: "A facts-absorb job failed inside the automatic facts drain; it retries with backoff until its attempts run out.", docs: 'docs/guides/facts-drain.md#deferrals', suggestion: 'Read doctor `facts_drain`: its message names the cause and its fix the next step (raising a spend cap is paid; ask the user first).', fix: { argv: ['gbrain', 'doctor', '--only', 'facts_drain', '--json'], consent: [], actor: 'agent', why: 'Shows the drain status, the backlog and the last error with its fix.', requires_exclusive: false } },facts_payload_expired: { class: 'server', summary: "The accepted fact extraction failed and its retained payload has expired." },fetch_failed: { class: 'retryable', summary: "Fetching the upstream failed." },file_too_large: { class: 'caller', summary: "The file is over the import size limit (5 MB for Markdown and code, 10 MiB for any sync read), so it was not imported.", why: "Size limits bound parsing, chunking and embedding cost. The same bytes refuse on every retry.", suggestion: 'Split the file into smaller files, or leave it out of the source (sync.exclude), then sync or import again.' },