{"record":{"id":"8a016ea54c4877ce","repo":"chenhg5/cc-connect","slug":"work-dir-is-required","errorCode":null,"errorMessage":"work_dir is required","messagePattern":"work_dir is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/engine.go","lineNumber":11482,"sourceCode":"\t\tif wd, ok := e.agent.(interface{ GetWorkDir() string }); ok {\n\t\t\tif dir := strings.TrimSpace(wd.GetWorkDir()); dir != \"\" {\n\t\t\t\treturn dir\n\t\t\t}\n\t\t}\n\t}\n\tif strings.TrimSpace(e.baseWorkDir) != \"\" {\n\t\treturn strings.TrimSpace(e.baseWorkDir)\n\t}\n\tif cwd, err := os.Getwd(); err == nil {\n\t\treturn cwd\n\t}\n\treturn \"\"\n}\n\nfunc normalizeSendWorkDir(workDir, base string) (string, error) {\n\tdir := strings.TrimSpace(workDir)\n\tif dir == \"\" {\n\t\treturn \"\", fmt.Errorf(\"work_dir is required\")\n\t}\n\tif dir == \"~\" || strings.HasPrefix(dir, \"~/\") {\n\t\thome, err := os.UserHomeDir()\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"resolve home directory: %w\", err)\n\t\t}\n\t\tif dir == \"~\" {\n\t\t\tdir = home\n\t\t} else {\n\t\t\tdir = filepath.Join(home, strings.TrimPrefix(dir, \"~/\"))\n\t\t}\n\t}\n\tif !filepath.IsAbs(dir) {\n\t\tif strings.TrimSpace(base) == \"\" {\n\t\t\tvar err error\n\t\t\tbase, err = os.Getwd()\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", fmt.Errorf(\"resolve current directory: %w\", err)","sourceCodeStart":11464,"sourceCodeEnd":11500,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/core/engine.go#L11464-L11500","documentation":"Sentinel validation error in normalizeSendWorkDir: the supplied work_dir argument is empty or whitespace-only after trimming. normalizeSendWorkDir refuses to resolve a session/send target with no directory specified.","triggerScenarios":"Thrown at core/engine.go:11482 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty work_dir (absolute, ~/..., or relative to the current work dir)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}