{"record":{"id":"82c4ea25f99c9f06","repo":"multica-ai/multica","slug":"parse-config-toml-shell-environment-expressions-82c4ea","errorCode":null,"errorMessage":"parse config.toml shell environment expressions: %s","messagePattern":"parse config\\.toml shell environment expressions: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/codex_shell_env.go","lineNumber":220,"sourceCode":"func tomlTableHeaderLineRange(content []byte, table *unstable.Node) (tomlByteRange, error) {\n\tit := table.Key()\n\tif !it.Next() {\n\t\treturn tomlByteRange{}, errorsForInvalidShellEnvTOML(\"table header has no key\")\n\t}\n\toffset := int(it.Node().Raw.Offset)\n\tif offset < 0 || offset > len(content) {\n\t\treturn tomlByteRange{}, errorsForInvalidShellEnvTOML(\"table key range is outside config\")\n\t}\n\tstart := bytes.LastIndexByte(content[:offset], '\\n') + 1\n\tend := len(content)\n\tif newline := bytes.IndexByte(content[offset:], '\\n'); newline >= 0 {\n\t\tend = offset + newline + 1\n\t}\n\treturn tomlByteRange{start: start, end: end}, nil\n}\n\nfunc errorsForInvalidShellEnvTOML(detail string) error {\n\treturn fmt.Errorf(\"parse config.toml shell environment expressions: %s\", detail)\n}\n\nfunc removeTOMLByteRanges(content []byte, ranges []tomlByteRange) ([]byte, error) {\n\tif len(ranges) == 0 {\n\t\treturn append([]byte(nil), content...), nil\n\t}\n\tsort.Slice(ranges, func(i, j int) bool {\n\t\tif ranges[i].start == ranges[j].start {\n\t\t\treturn ranges[i].end < ranges[j].end\n\t\t}\n\t\treturn ranges[i].start < ranges[j].start\n\t})\n\n\tmerged := make([]tomlByteRange, 0, len(ranges))\n\tfor _, r := range ranges {\n\t\tif r.start < 0 || r.end < r.start || r.end > len(content) {\n\t\t\treturn nil, errorsForInvalidShellEnvTOML(\"expression range is outside config\")\n\t\t}","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/codex_shell_env.go#L202-L238","documentation":"Error \"parse config.toml shell environment expressions: %s\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/codex_shell_env.go:220 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the shell environment expressions in config.toml so they parse."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}