SDKMigration guide

Migration guide

There is no earlier SDK to migrate from. This page covers moving scripts that call the CLI to the current flags and behaviour.

Keep your scripts working

  • Run syntic -p "<prompt>" for single tasks. The output formats are text, json and stream-json.
  • --input-format stream-json reads user messages as JSON lines from standard input.
  • Flags for tools and permissions are --allowed-tools, --disallowed-tools and --permission-mode.

Settings spelling

The permission mode bypassPermissions is still accepted, and bypass is the short form. Values ignore case and dashes or underscores, so accept-edits and acceptEdits both work. An unknown --permission-mode value is rejected with an error.

Things that changed or did not carry over

  • A repository cannot choose a permissive mode for you. permissionMode set to auto or bypass in a project settings file is dropped.
  • A program answers permission prompts over the wire protocol with --permission-prompt-tool stdio and --input-format stream-json: each approval question arrives as a can_use_tool request. Without it, a call that no rule settles is refused. See Permissions for programs.
  • Session transcripts are kept per project folder in the application data folder. See Session storage.

If a script depended on an older behaviour not listed here, check the CLI reference and the What’s new notes for the release it was written against.