{"record":{"id":"59fdcc46f5e8e2ef","repo":"sipeed/picoclaw","slug":"unsupported-transport-q-59fdcc","errorCode":null,"errorMessage":"unsupported transport %q","messagePattern":"unsupported transport %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/agent/hook_mount.go","lineNumber":228,"sourceCode":"\t}\n\n\tnames := make([]string, 0, len(specs))\n\tfor name, spec := range specs {\n\t\tif spec.Enabled {\n\t\t\tnames = append(names, name)\n\t\t}\n\t}\n\tsort.Strings(names)\n\treturn names\n}\n\nfunc processHookOptionsFromConfig(spec config.ProcessHookConfig) (ProcessHookOptions, error) {\n\ttransport := spec.Transport\n\tif transport == \"\" {\n\t\ttransport = \"stdio\"\n\t}\n\tif transport != \"stdio\" {\n\t\treturn ProcessHookOptions{}, fmt.Errorf(\"unsupported transport %q\", transport)\n\t}\n\tif len(spec.Command) == 0 {\n\t\treturn ProcessHookOptions{}, fmt.Errorf(\"command is required\")\n\t}\n\n\topts := ProcessHookOptions{\n\t\tCommand: append([]string(nil), spec.Command...),\n\t\tDir:     spec.Dir,\n\t\tEnv:     processHookEnvFromMap(spec.Env),\n\t}\n\n\tobserveKinds, observeEnabled, err := processHookObserveKindsFromConfig(spec.Observe)\n\tif err != nil {\n\t\treturn ProcessHookOptions{}, err\n\t}\n\topts.Observe = observeEnabled\n\topts.ObserveKinds = observeKinds\n","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/agent/hook_mount.go#L210-L246","documentation":"Process hooks communicate with picoclaw over their stdio; processHookOptionsFromConfig accepts only transport=\"stdio\", treating an empty value as stdio. Any other value — \"http\", \"grpc\", \"sse\" — is rejected immediately at config-validation time, before the process is started.","triggerScenarios":"hooks.processes.<name>.transport set to any string other than \"stdio\" (or omitted). E.g. a config written assuming MCP-style network transports apply to hooks.","commonSituations":"Copy-pasting transport concepts from tools.mcp servers (which do support sse/http) into hooks.processes; future-proofing configs with speculative values; docs from a different hook system.","solutions":["Remove the transport field entirely — stdio is the default","Or set it explicitly to \"stdio\"","If you need a remote hook, run a small local stdio shim that forwards to your remote service"],"exampleFix":"// before\n\"processes\": { \"audit\": { \"enabled\": true, \"transport\": \"http\", \"command\": [\"/opt/audit\"] } }\n\n// after\n\"processes\": { \"audit\": { \"enabled\": true, \"command\": [\"/opt/audit\"] } }","handlingStrategy":"validation","validationCode":"for name, p := range cfg.Hooks.Processes {\n    if p.Enabled && p.Transport != \"\" && p.Transport != \"stdio\" {\n        return fmt.Errorf(\"hooks.processes.%s: transport %q unsupported (only stdio)\", name, p.Transport)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Omit the transport field — stdio is the default and the only supported value","Do not copy transport blocks from tools.mcp server configs into hooks.processes","For remote hooks, deploy a local stdio shim process instead of a transport value"],"tags":["go","picoclaw","hooks","process-hooks","config","transport"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}