JuliusBrussee/caveman · error
create %s: %w
Error message
create %s: %w
What it means
Error "create %s: %w" thrown in JuliusBrussee/caveman.
Source
Thrown at shrink/shrink.go:92
// defaultCCRPath resolves the durable shared recovery store path, mirroring the
// engine CLI, MCP server, and proxy: CAVEMAN_CCR_DB, else CAVEMAN_HOME/ccr.db,
// else ~/.caveman/ccr.db. It creates the parent directory so the first shrink on a
// machine succeeds.
func defaultCCRPath() (string, error) {
if p := os.Getenv("CAVEMAN_CCR_DB"); p != "" {
return p, nil
}
home := os.Getenv("CAVEMAN_HOME")
if home == "" {
h, err := os.UserHomeDir()
if err != nil {
return "", fmt.Errorf("resolve home directory: %w", err)
}
home = filepath.Join(h, ".caveman")
}
if err := os.MkdirAll(home, 0o700); err != nil {
return "", fmt.Errorf("create %s: %w", home, err)
}
return filepath.Join(home, "ccr.db"), nil
}
// Result is the outcome of Shrink.
type Result struct {
Output []byte `json:"-"`
TokensBefore int `json:"tokens_before"`
TokensAfter int `json:"tokens_after"`
Ratio float64 `json:"ratio"`
Basis string `json:"basis"`
ContentType string `json:"content_type"`
RecoveryHandle string `json:"recovery_handle,omitempty"`
}
// Shrink compresses a tool catalog with an S4 lossy transform. It is fail-open:
// on any parse problem or when the result would not be smaller, it returns the
// input unchanged with ratio 0 and no handle.View on GitHub (pinned to 27d5a3981a)
Solutions
- Fix directory creation (path/permissions) and retry.
When it happens
Trigger: Thrown at shrink/shrink.go:92 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/b3b466598944b879.
Report an issue: GitHub.