{"record":{"id":"39ade2ce2cc030cf","repo":"sipeed/picoclaw","slug":"seahorse-context-manager-is-unavailable-on-this-pl","errorCode":null,"errorMessage":"seahorse context manager is unavailable on this platform","messagePattern":"seahorse context manager is unavailable on this platform","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/agent/context_seahorse_unsupported.go","lineNumber":13,"sourceCode":"//go:build mipsle || netbsd || (freebsd && arm)\n\npackage agent\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\n// newSeahorseContextManager is unavailable on platforms where modernc sqlite/libc\n// currently has no stable build path for this project.\nfunc newSeahorseContextManager(_ json.RawMessage, _ *AgentLoop) (ContextManager, error) {\n\treturn nil, fmt.Errorf(\"seahorse context manager is unavailable on this platform\")\n}\n\nfunc init() {\n\tif err := RegisterContextManager(\"seahorse\", newSeahorseContextManager); err != nil {\n\t\tpanic(fmt.Sprintf(\"register seahorse context manager: %v\", err))\n\t}\n}\n","sourceCodeStart":1,"sourceCodeEnd":21,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/agent/context_seahorse_unsupported.go#L1-L21","documentation":"The seahorse context manager depends on modernc.org/sqlite, which has no stable build path on some platforms; on those targets a stub is compiled instead (build tags: mipsle, netbsd, freebsd/arm — pkg/agent/context_seahorse_unsupported.go). Selecting agents.defaults.context_manager=\"seahorse\" on such a build makes the factory return this error. resolveContextManager then logs a warning and falls back to the legacy manager, so the process keeps running without seahorse features.","triggerScenarios":"Config sets context_manager to seahorse while the binary was built for mipsle, netbsd, or freebsd/arm — e.g. self-hosted NAS/router devices or BSD SBCs.","commonSituations":"Copying a working config from an amd64 machine to a mipsle router; running on NetBSD/FreeBSD-ARM where the sqlite build tags exclude the engine; CI cross-compile checks that load the full config.","solutions":["Switch agents.defaults.context_manager to \"legacy\" (or remove it — legacy is the default) on that host","Move the workload to a supported platform (linux/mac/windows on amd64/arm64) if seahorse retrieval is required","Verify with: go version GOOS/GOARCH or check the build tags before choosing seahorse in shared configs","Watch startup logs for the 'Failed to create context manager, falling back to legacy' warning to catch the silent downgrade"],"exampleFix":"// config — before\n\"agents\": { \"defaults\": { \"context_manager\": \"seahorse\" } }\n\n// after (on mipsle/netbsd/freebsd-arm)\n\"agents\": { \"defaults\": { \"context_manager\": \"legacy\" } }","handlingStrategy":"validation","validationCode":"func seahorseSupported() bool {\n    if runtime.GOARCH == \"mipsle\" {\n        return false\n    }\n    switch runtime.GOOS {\n    case \"netbsd\":\n        return false\n    case \"freebsd\":\n        return runtime.GOARCH != \"arm\"\n    }\n    return true\n}\n\nif cfg.Agents.Defaults.ContextManager == \"seahorse\" && !seahorseSupported() {\n    return fmt.Errorf(\"seahorse not available on %s/%s; use legacy\", runtime.GOOS, runtime.GOARCH)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Centralize the supported-platform check wherever shared configs are generated","Cross-compile CI (GOOS/GOARCH matrix) should assert the chosen context_manager is available","Alert on the 'falling back to legacy' startup warning so silent downgrades are noticed"],"tags":["go","picoclaw","seahorse","platform-support","build-tags","config"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}