{"record":{"id":"a68649bd78785f87","repo":"nanocoai/nanoclaw","slug":"unknown-system-action","errorCode":null,"errorMessage":"Unknown system action","messagePattern":"Unknown system action","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/delivery.ts","lineNumber":625,"sourceCode":"  return (content, session) => runGuarded(action, entry.guard, entry.handler, content, session, null);\n}\n\n/**\n * Handle system actions from the container agent.\n * These are written to messages_out because the container can't write to inbound.db.\n * The host applies them to inbound.db here.\n */\nasync function handleSystemAction(content: Record<string, unknown>, session: Session): Promise<void> {\n  const action = content.action as string;\n  log.info('System action from agent', { sessionId: session.id, action });\n\n  const registered = getDeliveryAction(action);\n  if (registered) {\n    await registered(content, session);\n    return;\n  }\n\n  log.warn('Unknown system action', { action });\n}\n\nexport function stopDeliveryPolls(): void {\n  activePolling = false;\n  sweepPolling = false;\n}\n","sourceCodeStart":607,"sourceCodeEnd":632,"githubUrl":"https://github.com/nanocoai/nanoclaw/blob/294ef2aee85218b23ad30eda9dfe10e590b54a8c/src/delivery.ts#L607-L632","documentation":"Logged when a system action message in outbound.db names an action that is not in the delivery-action registry. The host's deliverMessage path dispatches system actions by name via getDeliveryAction(action); an unknown name falls through to this warn and the message is silently dropped (no delivery).","triggerScenarios":"An agent or host code writes a messages_out row with type 'system' whose action string is misspelled, removed in a version upgrade, or registered in a different module that failed to import/self-register.","commonSituations":"Upgrading NanoClaw where a system action was renamed or removed; a custom agent writes an ad-hoc system action; a module registering an action failed to load so its registry entry is missing.","solutions":["Check the exact action string in the messages_out row (query outbound.db) against the registered action names in src/delivery.ts registry","If the action was renamed in an upgrade, update the writer or drain the stale row","Verify the module that registers the action is imported (barrel self-registration) and host logs show no import failure","Delete/deliver the orphan row so the poll stops retracing it"],"exampleFix":"// before\nawait writeSystemAction(outDb, { action: 'scheduel_task', content });\n\n// after\nawait writeSystemAction(outDb, { action: 'schedule_task', content });","handlingStrategy":"validation","validationCode":"import { getDeliveryAction } from './delivery.js';\nfunction isKnownSystemAction(action: string): boolean {\n  return getDeliveryAction(action) !== undefined;\n}\n// before writing: assert isKnownSystemAction(action)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Centralize system action names in one exported const/union instead of string literals","Log at write time when persisting an unregistered action name","After upgrades, grep for removed/renamed action strings in stale DB rows"],"tags":["delivery","system-action","registry","unknown-action"],"backgroundTag":"unknown-dispatch-action","analyzedSha":"294ef2aee85218b23ad30eda9dfe10e590b54a8c","analyzedAt":"2026-08-28T13:59:10.357Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}