Skip to main content
If your old difyctl started failing with catalog_stale (“The request was built from a catalog that is not this server’s current catalog”), your Dify server has already moved to 1.18.0 or later.

Switch to the New Build

1

Install the New Build

Install the difyctl that matches your server.Remove any other copy of the old build, such as in a CI image. Running its auth logout after you’ve signed in with the new build can delete the new build’s saved token, and you’d have to sign in again.If you still need the old build for a server that’s on 1.17.x or earlier, such as production while staging moves first, install it to its own folder with DIFYCTL_PREFIX and run it with its own config folder. That folder starts empty, so sign the old build in again there:
2

Sign In Again

Check that it worked with difyctl describe account.For sign-in options and where the new build keeps your token, see Manage Your Sign-In. To sign in a CI job, see Use difyctl in CI and Automation.
3

End the Old Session

Signing in with the new build doesn’t end the old build’s session on the server. It stays valid for up to 14 days by default. End it now if anyone else could have the old token, such as on a shared machine or in a copied config folder. Otherwise, you can let it expire.To end it, list your sessions and delete the one labeled difyctl on <your-machine-name>. Your new session is labeled with just your machine’s name. The delete doesn’t ask for confirmation, so check the ID before you run it.
4

Reinstall the difyctl Skill

If a coding agent such as Claude Code or Codex uses difyctl through the difyctl skill, reinstall it, even if nothing looks broken.The old build’s skills install --yes installed the difyctl skill for every coding agent it detected. Check which of these folders you have:
install skills replaces the difyctl skill only in the skills folder you pass it. Run it for each coding agent you still use, and delete the difyctl folder from the rest:
The old skills install <dir> wrote SKILL.md straight into <dir>. If you pointed it at a coding agent’s skills folder, delete the file it left there, such as ~/.claude/skills/SKILL.md.For everything else a coding agent needs to use difyctl, see Set Up Your Coding Agent.

Replace Your Old Commands

Most commands now take IDs and other values as named flags, such as --app-id, rather than by position. For every flag a command takes, run difyctl help <command>. The only global flags left are --verbose, --json, and --help. Short flags such as -v, -y, and -w are gone. --verbose now only adds the server’s raw response to errors. No command asks for confirmation, so drop --yes.

Sign-In and Sessions

Apps

If you’re not sure of an app’s type, describe console_app shows it. Here’s how a Chatbot run and a Workflow run with inputs from a file change:

Human Input

A run that stops for human input now reports "status": "suspended" instead of "paused", so update any script that checks for paused. The suspended result’s hints carry the submit run form command for each action, with the form token filled in. To submit the form yourself, resume app becomes submit run form:
Unlike resume app, submit run form doesn’t follow the run. To get the rest of it, run the hint it returns, get run event.

DSL Export and Import

To save an export to a file, extract .data:
The old build confirmed a pending import on its own, and the new build doesn’t. An import is pending when the file’s DSL version is newer than the server’s, or a major version older. If you trust the file, finish it with confirm console_app dsl_import --import-id <import-id>. The old build also listed missing integrations after an import. Run check console_app dependency for that now.

Workspaces and Members

Config, the difyctl Skill, Help, and Version

Update the Rest of Your Scripts

Read Results as JSON

Results are always JSON now. -o fails as an unknown flag, so drop -o json from your scripts. Where a script asked for another format, such as -o name or -o yaml, reshape the JSON yourself, for example with jq. To keep only a Chatbot’s reply as text:
Set DIFY_OUTPUT=json in your scripts, or pass --json, so errors are JSON wherever they run. Without it, errors on stderr are JSON in a pipe but text in a terminal.

Handle the New Exit and Error Codes

Exit codes keep their numbers, with two changes:
  • 6 now means difyctl couldn’t find the command on your server: it couldn’t fetch the server’s command list, or nothing on the list matches what you typed. It used to mean a version mismatch.
  • 64 is gone, along with version --check-compat.
If a script branches on error codes:
  • Replace server_4xx_other and server_5xx with server_error, and check the HTTP status that comes with it.
  • Replace token_expired and expired_token with auth_expired, which exits 4.
  • Drop branches for version_skew, unsupported_endpoint, client_error, illegal_argument, and config_schema_unsupported.
For what the new codes mean, such as input_invalid and catalog_unavailable, see Results, Errors, and Exit Codes.

Retry in Your Scripts

The new build doesn’t retry failed requests, and --http-retry is gone. If a script counted on retries, add your own. For which commands are safe to retry, see Retry a Failed Command.

Update Environment Variables

Remove these from your scripts and CI settings:
  • DIFY_LIMIT: pass --limit instead.
  • DIFYCTL_HTTP_RETRY: nothing replaces it.
  • DIFYCTL_NO_COLOR: use NO_COLOR instead.
  • DIFY_CACHE_DIR: the cache now lives in the config folder, so DIFY_CONFIG_DIR covers it.
These work as before: DIFY_CONFIG_DIR and DIFY_WORKSPACE_ID. For every variable the new build reads, see Environment Variables.
Last modified on October 23, 2026