{"id":"c6fdee7f8c531657","repo":"go-redis/redis","slug":"redis-hello-with-arguments-is-not-allowed-when-cl","errorCode":null,"errorMessage":"redis: HELLO with arguments is not allowed when client-side caching is enabled","messagePattern":"redis: HELLO with arguments is not allowed when client-side caching is enabled","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"csc_integration.go","lineNumber":533,"sourceCode":"// escape hatches — Do(ctx, \"client\", \"tracking\", ...) with string or []byte\n// args, and pipelines — are also caught: the guard matches on the command's\n// leading args, not the typed method.\nvar errClientTrackingWithCSC = errors.New(\n\t\"redis: CLIENT TRACKING is not allowed when client-side caching is enabled\")\n\n// errSelectWithCSC rejects runtime SELECT on clients with built-in CSC. Cache\n// keys use Options.DB, while SELECT mutates only the chosen pool connection.\nvar errSelectWithCSC = errors.New(\n\t\"redis: SELECT is not allowed when client-side caching is enabled\")\n\n// errAuthWithCSC rejects runtime authentication because it can change one\n// connection's ACL identity without changing the client's fixed cache namespace.\nvar errAuthWithCSC = errors.New(\n\t\"redis: AUTH is not allowed when client-side caching is enabled\")\n\n// errHelloWithCSC rejects HELLO with arguments because it can switch a tracked\n// connection out of RESP3 (and can also change authentication).\nvar errHelloWithCSC = errors.New(\n\t\"redis: HELLO with arguments is not allowed when client-side caching is enabled\")\n\n// errResetWithCSC rejects RESET because it disables tracking and switches the\n// connection to RESP2.\nvar errResetWithCSC = errors.New(\n\t\"redis: RESET is not allowed when client-side caching is enabled\")\n\n// errSubscribeWithCSC rejects raw subscriptions on the ordinary pool. The\n// typed Subscribe methods use dedicated PubSub connections and remain allowed.\nvar errSubscribeWithCSC = errors.New(\n\t\"redis: SUBSCRIBE is not allowed on pooled connections when client-side caching is enabled\")\n\n// cscCommandError rejects commands that can make a pooled connection's state\n// diverge from the assumptions used by CSC.\nfunc (c *baseClient) cscCommandError(cmd Cmder) error {\n\t// The successful attachment signal is shared with derived clients.\n\t// initConn's internal command wrapper is exempt during library setup.\n\tif !c.cscTrackingRequested() || c.allowClientTracking {","sourceCodeStart":515,"sourceCodeEnd":551,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/csc_integration.go#L515-L551","documentation":"Error \"redis: HELLO with arguments is not allowed when client-side caching is enabled\" thrown in go-redis/redis.","triggerScenarios":"Thrown at csc_integration.go:533 when the library encounters an invalid state.","commonSituations":"Keep handshake concerns in options, not runtime commands, on CSC clients.","solutions":["Set protocol and credentials via redis.Options; do not call HELLO manually with arguments when CSC is enabled","Use a client without CSC if you must drive the HELLO handshake yourself"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}