{"record":{"id":"3b7a400a4c5233d3","repo":"tinyhumansai/openhuman","slug":"recovery-phrase-is-required","errorCode":null,"errorMessage":"Recovery phrase is required.","messagePattern":"Recovery phrase is required\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/features/wallet/setupLocalWalletFromMnemonic.ts","lineNumber":22,"sourceCode":"  deriveWalletAccountsFromMnemonic,\n  type WalletSetupSource,\n} from '../../utils/cryptoKeys';\nimport { openhumanEncryptSecret } from '../../utils/tauriCommands/auth';\n\nexport async function persistLocalWalletFromMnemonic(args: {\n  mnemonic: string;\n  source: WalletSetupSource;\n  setEncryptionKey: (value: string | null) => Promise<void>;\n  /**\n   * Set to `true` only when the user has explicitly confirmed wallet replacement\n   * through the double-confirmation dialog. Defaults to `false`.\n   */\n  force?: boolean;\n}): Promise<void> {\n  const { mnemonic, source, setEncryptionKey, force } = args;\n  const words = mnemonic.trim().split(/\\s+/).filter(Boolean);\n  if (words.length === 0) {\n    throw new Error('Recovery phrase is required.');\n  }\n  const normalizedMnemonic = words.join(' ');\n  const aesKey = deriveAesKeyFromMnemonic(normalizedMnemonic);\n  const encryptedMnemonic = (await openhumanEncryptSecret(normalizedMnemonic)).result?.trim();\n  if (!encryptedMnemonic) {\n    throw new Error('Failed to secure recovery phrase. Please try again.');\n  }\n\n  await setEncryptionKey(aesKey);\n  await setupLocalWallet({\n    consentGranted: true,\n    source,\n    mnemonicWordCount: words.length,\n    encryptedMnemonic,\n    accounts: deriveWalletAccountsFromMnemonic(normalizedMnemonic),\n    force,\n  });\n}","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/app/src/features/wallet/setupLocalWalletFromMnemonic.ts#L4-L40","documentation":"Argument-loop error from `openhuman memory namespaces` (alias `ns`). This subcommand takes NO arguments at all besides `-v/--verbose` and `-h/--help` — it simply lists namespaces. Any other token aborts.","triggerScenarios":"`openhuman memory namespaces --all`; `openhuman memory ns default`; `openhuman memory namespaces -q foo`.","commonSituations":"Trying to filter or inspect one namespace positionally; piping flags from a generic wrapper that appends extras to every subcommand.","solutions":["Run it bare: `openhuman memory namespaces` (optionally with -v)","Filter client-side: `openhuman memory namespaces | grep '^docs'`","Remove flags your wrapper unconditionally appends"],"exampleFix":"# before\nopenhuman memory namespaces --all\n# after\nopenhuman memory namespaces","handlingStrategy":"validation","validationCode":"# bash: namespaces takes no real arguments\nfor a in \"$@\"; do case \"$a\" in -v|--verbose|-h|--help) ;; *) echo \"unexpected arg: $a\" >&2; exit 2;; esac; done\nopenhuman memory namespaces \"$@\"","typeGuard":null,"tryCatchPattern":"if ! out=$(openhuman memory namespaces \"$@\" 2>&1); then\n  case \"$out\" in *\"unknown namespaces arg\"*) echo 'usage: openhuman memory namespaces [-v]' >&2; exit 2;; esac\n  printf '%s\\n' \"$out\" >&2; exit 1\nfi","preventionTips":["Filter namespace lists client-side (grep/jq) instead of adding CLI flags"],"tags":["cli","usage","argument-parsing","memory"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}