{"record":{"id":"a33e7c718748dc28","repo":"eyaltoledano/claude-task-master","slug":"missing-configuration-a33e7c","errorCode":"MISSING_CONFIGURATION","errorMessage":"Organization ID is required for export. Use \"tm context org\" to select one.","messagePattern":"Organization ID is required for export\\. Use \"tm context org\" to select one\\.","errorType":"error_code","errorClass":"TaskMasterError","httpStatus":null,"severity":"error","filePath":"packages/tm-core/src/modules/integration/services/export.service.ts","lineNumber":399,"sourceCode":"\t\tconst isAuthenticated = await this.authManager.hasValidSession();\n\t\t// Validate authentication\n\t\tif (!isAuthenticated) {\n\t\t\tthrow new TaskMasterError(\n\t\t\t\t'Authentication required for export',\n\t\t\t\tERROR_CODES.AUTHENTICATION_ERROR\n\t\t\t);\n\t\t}\n\n\t\t// Get current context\n\t\tconst context = await this.authManager.getContext();\n\n\t\t// Determine org and brief IDs\n\t\tconst orgId = options.orgId || context?.orgId;\n\t\tconst briefId = options.briefId || context?.briefId;\n\n\t\t// Validate we have necessary IDs\n\t\tif (!orgId) {\n\t\t\tthrow new TaskMasterError(\n\t\t\t\t'Organization ID is required for export. Use \"tm context org\" to select one.',\n\t\t\t\tERROR_CODES.MISSING_CONFIGURATION\n\t\t\t);\n\t\t}\n\n\t\tif (!briefId) {\n\t\t\tthrow new TaskMasterError(\n\t\t\t\t'Brief ID is required for export. Use \"tm context brief\" or provide --brief flag.',\n\t\t\t\tERROR_CODES.MISSING_CONFIGURATION\n\t\t\t);\n\t\t}\n\n\t\t// Get tasks from the specified or active tag\n\t\tconst activeTag = this.configManager.getActiveTag();\n\t\tconst tag = options.tag || activeTag;\n\n\t\t// Always read tasks from local file storage for export\n\t\t// (we're exporting local tasks to a remote brief)","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/packages/tm-core/src/modules/integration/services/export.service.ts#L381-L417","documentation":"exportTasks() resolves the target organization from options.orgId or the current context (context?.orgId). If neither is set, it throws TaskMasterError with code MISSING_CONFIGURATION because the export API needs to know which organization owns the brief. The message points to `tm context org` as the remediation command.","triggerScenarios":"Calling exportTasks() without options.orgId while the current context has no orgId selected (never ran `tm context org`, or context was cleared/reset).","commonSituations":"New machine or fresh clone where context was never initialized; multiple organizations and none selected; scripting the export programmatically and omitting orgId in the options object.","solutions":["Run `tm context org` to select an organization, then retry the export.","Pass orgId explicitly: exportTasks({ orgId: '<org-id>', briefId, ... }).","Verify the current context (`tm context show`) — it may have been reset after logout or config deletion.","If exporting via a brief ID/URL, use exportFromBriefInput() which resolves the org from the brief automatically."],"exampleFix":"// before\nawait exportService.exportTasks({ briefId: 'b-123' });\n// after\nawait exportService.exportTasks({ orgId: 'org-456', briefId: 'b-123' });\n// or select once via CLI: tm context org","handlingStrategy":"validation","validationCode":"const context = await tmCore.context.get();\nconst orgId = options.orgId ?? context?.orgId;\nif (!orgId) {\n  throw new Error('No org selected — run `tm context org` or pass orgId');\n}\nawait exportService.exportTasks({ ...options, orgId });","typeGuard":null,"tryCatchPattern":"try {\n  await exportService.exportTasks(options);\n} catch (e) {\n  if (e instanceof TaskMasterError && e.code === ERROR_CODES.MISSING_CONFIGURATION) {\n    console.error(e.message); // includes the `tm context org` remediation hint\n    return;\n  }\n  throw e;\n}","preventionTips":["Select org and brief once per workspace with `tm context org` / `tm context brief`","Inspect context with `tm context show` before scripted exports","Pass orgId/briefId explicitly in scripts instead of relying on ambient context","Prefer exportFromBriefInput() when you have a brief ID/URL, since it resolves the org automatically"],"tags":["configuration","export","organization"],"backgroundTag":"missing-configuration","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}