{"record":{"id":"698a9f08415c43ed","repo":"plandex-ai/plandex","slug":"error-writing-accounts-v","errorCode":null,"errorMessage":"error writing accounts: %v","messagePattern":"error writing accounts: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/cli/auth/state.go","lineNumber":83,"sourceCode":"\t\t\tfound = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif !found {\n\t\taccounts = append(accounts, toStore)\n\t}\n\n\tbytes, err := json.Marshal(accounts)\n\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error marshalling accounts: %v\", err)\n\t}\n\n\terr = os.WriteFile(fs.HomeAccountsPath, bytes, os.ModePerm)\n\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error writing accounts: %v\", err)\n\t}\n\n\treturn nil\n}\n\nfunc writeCurrentAuth() error {\n\tif Current == nil {\n\t\treturn fmt.Errorf(\"error writing auth: auth not loaded\")\n\t}\n\n\tbytes, err := json.Marshal(Current)\n\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error marshalling auth: %v\", err)\n\t}\n\n\terr = os.WriteFile(fs.HomeAuthPath, bytes, os.ModePerm)\n","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/cli/auth/state.go#L65-L101","documentation":"Fires in storeAccount when os.WriteFile cannot persist the marshalled accounts JSON to fs.HomeAccountsPath. Indicates filesystem-level trouble: bad permissions, missing parent dir, disk full, or a read-only home.","triggerScenarios":"Thrown at app/cli/auth/state.go:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for permission or path issues","Ensure the config/home directory exists before writing","Verify disk space and that the path is writable by the current user"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}