{"record":{"id":"4418ce3e44a7ff17","repo":"larksuite/cli","slug":"exec-provider-output-exceeded-maxoutputbytes-d","errorCode":null,"errorMessage":"exec provider output exceeded maxOutputBytes (%d)","messagePattern":"exec provider output exceeded maxOutputBytes \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/binding/secret_resolve_exec.go","lineNumber":187,"sourceCode":"\n\tcmd := exec.CommandContext(ctx, prep.Path, prep.Args...)\n\tcmd.Dir = filepath.Dir(prep.Path)\n\tcmd.Env = prep.Env // always set — leaving nil would inherit the parent env\n\tcmd.Stdin = bytes.NewReader(prep.Request)\n\n\tvar stdout, stderr bytes.Buffer\n\tcmd.Stdout = &stdout\n\tcmd.Stderr = &stderr\n\n\tif err := cmd.Run(); err != nil {\n\t\tif ctx.Err() == context.DeadlineExceeded {\n\t\t\treturn nil, fmt.Errorf(\"exec provider timed out after %dms\", int(prep.Timeout/time.Millisecond))\n\t\t}\n\t\treturn nil, fmt.Errorf(\"exec provider exited with error: %w\", err)\n\t}\n\n\tif stdout.Len() > prep.MaxOut {\n\t\treturn nil, fmt.Errorf(\"exec provider output exceeded maxOutputBytes (%d)\", prep.MaxOut)\n\t}\n\n\ttrimmed := bytes.TrimSpace(stdout.Bytes())\n\tif len(trimmed) == 0 {\n\t\treturn nil, fmt.Errorf(\"exec provider returned empty stdout\")\n\t}\n\treturn trimmed, nil\n}\n\n// extractExecSecret parses stdout as a JSON execResponse and returns the\n// string value at refID. When jsonOnly is false and the response is not valid\n// JSON (or the value is not a string), it falls back to the raw stdout or the\n// JSON encoding of the value respectively — mirroring OpenClaw's resolve.ts.\nfunc extractExecSecret(stdout []byte, refID string, jsonOnly bool) (string, error) {\n\tvar resp execResponse\n\tif err := json.Unmarshal(stdout, &resp); err != nil {\n\t\tif !jsonOnly {\n\t\t\treturn string(stdout), nil","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/binding/secret_resolve_exec.go#L169-L205","documentation":"Fails an exec secret-provider subprocess whose stdout exceeded the configured byte cap (prep.MaxOut) after a successful exit. Fires when the provider emits more output than the resolver will accept, preventing unbounded memory use; the caller should shrink provider output or raise maxOutputBytes.","triggerScenarios":"Thrown at internal/binding/secret_resolve_exec.go:187 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the provider's stdout output","Raise the configured maxOutputBytes ceiling for that provider"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}