Release notes
What changed in each published release of cotctl, newest first — with the migration steps you need when something breaks.
Check which version you're on:
cotctl --version
And upgrade to the latest one:
npm install -g @cotctl/cli@latest
Read the breaking changes before upgrading. Every release lists them first, and each one tells you exactly what to change in your YAML or in your pipeline. Releases with no breaking-changes section are safe to take as-is.
0.16.0 — 2026-11-04
The headline is data-loss advisories. When a release fixes a loss of data, it now publishes an advisory with the package, and from this version on cotctl does not run a command an advisory names on a version it affects: it exits with a new code, 5, --dry-run included. The first one, COTCTL-2026-001, covers the card labels and allowed extensions that every StateMachine update erased from 0.5.1 to 0.11.x. See cotctl update.
The rest of the release makes the dry run and validate --remote reach the apply's verdict in many more cases, sends Routine updates through the server's keyed route where it has one, lets a COTProperty node reference a Property by code and refuses the references the webclient cannot show, stops a simplified survey re-apply from erasing exec.onChange, exec.presave and exec.filter, and fixes SLA applies, which since 0.12.0 reported every write as failed — and so stopped apply --dir at the first SLA file. Read Breaking changes before the first run on 0.16.0; the Migration checklist at the end of this section lists the main steps.
⚠ Breaking changes
Grouped by theme. Each group says who it affects and what to do.
Data-loss advisories stop a command with exit 5
A command a published data-loss advisory names no longer runs on a version it affects. The check before every command reads the advisories together with the latest version. A named command stops,
--dry-runincluded, after printing the loss, the advisory id and the version that fixes it on stderr. Without a terminal, in CI or with-y, it exits5right away. On a terminal it offersupdateorcancel— there is nocontinue— andcancelexits5; an update that fails stops the command too, where a failed automatic update lets it run. Every other command runs as before, soexportkeeps working on an affected version to back up what is stored.COTCTL_NO_UPDATE_CHECKno longer turns the whole check off. It still silences the update notice, the prompt and the automatic install, but not the advisories: a command an advisory names still exits5, and the lookup that brings them still runs — at most once every 12 hours while~/.cotctlcan be written, which on a runner that starts with an empty home directory is once per job. Where npm cannot be reached, that lookup waits up to 1.5 seconds before the command runs.Who this affects: every pipeline, and anyone who set
COTCTL_NO_UPDATE_CHECKto keepcotctloff the network.What to do: when a command exits
5, updatecotctland run it again. To run an affected version anyway, setCOTCTL_ACCEPT_ADVISORYto the id the message names — several ids separated by commas or spaces, matched whatever their case; the command then runs with a warning on stderr.npm view @cotctl/cli cotctl.advisories --jsonlists the published advisories. Only 0.16.0 and later read them: an earlier version, 0.14.x and 0.15.x included, runs every command whatever is published.
SLA applies succeed, and apply --dir now reaches the files after them
slas apply and apply --dir report the SLA they created or updated as created or updated, and exit 0. In every version from 0.12.0 until this one, each SLA create and update ended in the backend accepted the write but answered with no Sla document, so nothing was written and exit 1, although the write had happened. So apply --dir without --continue-on-error stopped after the first file holding an SLA, and never applied the rest of the SLA files, nor the Schedule, User, Bot and Webhook files after them.
- Who this affects: anyone who runs
apply --dirover a directory that holds SLAs, and scripts that read that1as "nothing was written". - What to do: before the first
apply --diron 0.16.0, review the files that come after the first SLA file, or run the sameapply --dirwith--dry-run: this version applies them. A script now gets0for the same write.
cotctl login -c names the profile
login saves the profile under the name -c gives it, before or after login, as --profile does. It used to ignore -c and save the profile under the --subdomain value, with exit 0. When -c and --profile are both given with different names, --profile wins and login warns on stderr. An empty or blank -c counts as not given.
- Who this affects: scripts, aliases and wrappers that pass
-ctologin— including one that adds-cto every command. - What to do: select the profile by its
-cname, or drop-cfrom theloginline. When the-cname is a profile that already exists,loginnow asks before overwriting it, and without a terminal or--yesexits1where it used to save under the subdomain. With--yesit does not ask: it overwrites that profile with the credentials of whichever environment the login authenticated against, so check the name a script that passes both-cand--yestargets.
Survey YAML: what validation accepts and refuses
Validation now follows what the server stores and the webclient's survey builder saves.
Accepted now:
- a
gteorltecondition on a question that is neither atextnumbernor adatetime, in both formats, with a warning: the webclient compares those operators only on a number or a date, so the condition never matches and the question is never shown. The raw format refused it, and the simplified format accepted it without a word; - a raw
exec.onPlay.buttonwith any oflabel,type,themeordebounceTimemissing, or anullbutton — the server leaves each key optional; - under
allow: jobTitle,jobs: "*", which the builder saves for every job title;jobs: [], with a warning that it leaves the person picker with no users; and a list holding"*", with a warning, which the apply sends as the string"*"where it used to fail withJobTitle "*" not found; - a syntax error in a simplified
+tablecolumn'sexec.onDisplay,exec.onPlay,exec.postsaveorexec.onSubmitSuccess, with a warning: the server never parses a column's exec, and a cell never runs those stages.preloadandvalidatestill fail.
- a
Refused now: a simplified
exec.onChange,exec.presaveorexec.filterthat is not an object, and, on a question, one whose JavaScript does not parse. The simplified format now sends these stages (see Fixed), and the server parses them when it saves the question. Both refusals stopvalidateand the apply. The object check is part of the schema, so--skip-semantic-validationdoes not turn it off; the syntax check is semantic, so it does.New messages:
jobswritten as a single code still fails, withjobs must be a list, or "*" for every job title; a missingjobsfails withjobs is required when allow is "jobTitle": ….Under
--skip-semantic-validationonly,validate --remoteand the survey apply look up a question identifier holding/,?,#or%as written, where the lookup cut it short or decoded it. The verdict can turn either way: an identifier a question of another survey of the company already uses is now refused as a conflict, and one that was refused for the text before a?or#now passes. Without the flag, the semantic check refuses such an identifier first.Who this affects: pipelines that relied on
validateto stop agteorlteon text or an emptyjobs, or that match the oldjobsmessages; anyone with simplified exec stages, whichvalidateand every apply,--dry-runincluded, now refuse when they are not objects or do not parse.What to do: where you relied on a refusal, match the new warning on stderr; update any match on the
jobsmessages. Write a simplified exec stage as an object —srcandcontext, plusfilteron thefilterstage. Wherevalidatenames a syntax error in one, fix the JavaScript at the path it gives, or remove the stage: the webclient never runs it, and the apply then erases it from the question. Rename an identifier refused as a conflict.
Properties and PropertyTypes
The Property
coderules apply only to a create. The API enforces them —^[a-z][_a-z0-9]*$, at least 3 and at most 50 characters — when it creates a Property, a PATCH cannot change a storedcode, and the backend stores many codes that do not match, whichproperties exportwrites as stored. Sovalidate -fandvalidate --direxit0with a warning on such a code, where they exited1(or, past 50 characters, passed without a word), andproperties apply,apply -fandapply --dirrefuse it only when they would create the Property,--dry-runincluded. An emptycodestill failsvalidate.A
COTPropertynode's value must name an active Property of the node'ssubType, bycodeor_id. The webclient lists a node's Properties by itssubType, so it showed anything else as empty and dropped it at the next edit.properties apply,apply -fandapply --dir,--dry-runincluded, now fail that Property for a Property of anothersubType, any reference under a node with nosubType, an_idof a deleted or deactivated Property or of none, an empty item in a list, and a Property the list already holds — a code and the_idof the same Property count as a repeat. A value the Property already stores stays, with a warning.properties exportwrites thecodeof a Property aCOTPropertynode references, where it wrote its_id, so the export round-trips by code. An_idit cannot name — a deleted or deactivated Property's, or one under a PropertyType that is inactive or that the profile cannot read — stays, with a warning.A schema node
keylonger than 62 minus the length of the PropertyType'scodeis refused byproperty-types apply,apply -fandapply --dir,--dry-runincluded, on a node they create, and on an update of a type that stores one whenever the update sends something. The backend checks that limit on every node of every write, so such a key passedvalidateand the dry run and failed the apply.validatewarns about it.Who this affects: pipelines that relied on
validateto stop a bad Property code, anyone applying Properties withCOTPropertyreferences, and scripts that read ids out of a Properties export.What to do:
- Rely on the dry run for the code check before a create:
--dry-runrefuses the code with exit1when the apply would create the Property. Depending on the server's configuration, the apply of an update that sends a change to a Property whose code breaks the rules can still fail, althoughvalidateand the dry run let it through; a re-apply that changes nothing sends no request. - Reference an active Property of the node's
subType, and drop empty and repeated items. A stored node'ssubTypecannot change, so moving a reference to a node that has one means a new node. - Apply a Properties export taken with 0.16.0 with 0.16.0 or later: an older
cotctlsends the codes as written and the backend refuses them. An export taken earlier still applies. - Shorten the node
key, or thecodeof a type being created. A type already stored with such a key refuses every write in the backend, with or withoutcotctl.
- Rely on the dry run for the code check before a create:
validate --remote checks the Surveys a Workflow names
validate --dir --remote and validate -f --remote fail on a Survey a Workflow names — a StartForm's requiredSurvey, a transition's requiredSurvey, a State's surveyTriggers — that the server does not have, as apply --dry-run already did; they used to end ready to apply. The error names where the Workflow names the Survey. With --dir, a Survey the directory declares counts as present, since apply --dir creates every Survey before any Workflow; with -f, only the server counts. A missing profile now stops such a run, where it passed. Without --remote nothing changes.
- Who this affects: pipelines that gate a pull request on
validate --remote. - What to do: correct the Survey code, add the Survey to the directory, or apply it first. Validate a Workflow file whose Surveys sit in sibling files with
--dir, next to them. Pass-c <profile>, or setCOTCTL_TOKENandCOTCTL_API_URL:--remotecannot look a Survey up without a credential.
Exit codes
These cases change:
| Command | Case | Was | Now |
|---|---|---|---|
Any command a published advisory names, --dry-run included | Run on a version the advisory affects | The command ran | 5, not run |
slas apply, apply --dir | An SLA created or updated | 1 | 0 |
workflows apply, apply -f, apply --dir | A partial: true Workflow that is not valid once merged with the stored one — a state, transition or state machine it names that is not stored and leaves out what a new one needs, a key named twice, a key the stored list repeats, a bot slot holding several stored bots | 1 | 2, as a partial: true Bot, Routine, SLA or Schedule already got |
validate --dir --remote, validate -f --remote | A Workflow names a Survey the server does not have (nor, with --dir, the directory) | 0 | 1 |
validate --remote | A Workflow names a Survey to look up, and no profile is given | 0 | 1 |
validate -f, validate --dir | A Property code outside ^[a-z][_a-z0-9]*$ or shorter than 3 characters | 1 | 0, with a warning |
validate, every apply | A gte or lte on a question other than a textnumber, in the raw format; a raw onPlay button with missing keys or null; jobs: "*" or jobs: [] | 1 from validate; 2 from every apply | 0, some with a warning |
validate, surveys apply, apply -f, apply --dir | A simplified exec.onChange, exec.presave or exec.filter that is not an object, or, on a question, whose JavaScript does not parse | 0, with a warning | 1 from validate; 2 from every apply, --dry-run included |
properties apply, apply -f, apply --dir | An update of a Property whose code breaks the code rules — outside ^[a-z][_a-z0-9]*$, shorter than 3 or longer than 50 characters | 1, refused on every apply | 0: only a create refuses it |
properties apply, apply -f, apply --dir | A COTProperty reference outside the node's subType or under a node with none, an _id of a deleted or deactivated Property, an empty or repeated item | 0 | 1, on the apply as on the dry run |
routines apply, apply --dir | A Routine whose stored stages repeat a key or lack one, on a server with the keyed route | The update went through by _id | 1, nothing written |
--dry-run of Workflows, Properties and PropertyTypes | A write the apply refuses (see Fixed) | 0 | 1, with the apply's error |
surveys apply, apply -f, apply --dir, each with --dry-run --skip-semantic-validation | A shape the apply refuses when it builds the survey, such as a single-value personFilter.jobs | 0 | The apply's code: 2 for an input refusal, 1 for any other failure |
logs get --parts stage:<key> | A log with no stage by that key | 0, and a file with no results | 1, and no file for it |
schedules logs, webhooks list, webhooks logs | COTCTL_COMPANY_ID does not match the company of COTCTL_TOKEN | 1 | 2 |
schedules logs, webhooks list, webhooks logs | A -l that is not a positive integer, or above 100 on schedules logs | Sent as written, or replaced (see Fixed) | 2, nothing sent |
login | -c names an existing profile, with no terminal and no --yes | 0, saved under the subdomain | 1 |
A partial: true Workflow still exits 1 when the schema rejects the YAML itself, when it comes with --legacy-replace-workflows, when a state machine it names is stored pointing at a propertyType or an asset.propertyType that no longer exists, and when its nameCode or id is not stored. A partial: true PropertyType the merge refuses also still exits 1. A logs get that stops at a missing stage prints no manifest under --json, and the files written before it stay. cotctl logs keeps its own 3 and 4.
- Who this affects: any script or pipeline that branches on
$?. - What to do: re-check each row your scripts rely on.
5means only an advisory stop, so a pipeline can tell it apart from a failed apply. TheCOTCTL_COMPANY_IDrefusal still exits1from other commands, so test for a non-zero exit there. A script that reads one stage from several logs fixes the key with the stages the error names, or leaves that log out;logs pullstill writes such logs, with a warning.
Added
- Data-loss advisories and
COTCTL_ACCEPT_ADVISORY— see Breaking changes, andcotctl updatefor every case, prompt and message. - Routine updates go through the server's keyed route where it has one.
routines applyandapply --dirsend an update by the Routine'scodeand fall back to the update by_idon a server without the route, at the cost of one attempt per run. The Routine ends up the same either way, except for one thing: the keyed route replacesdataTypewhole, so an input written over another stored one keeps nothing of it. On that route:--dry-runasks the server to validate the update without saving it. A profile without write permission, and a server without the route, getcotctl's own preview as before.cotctlchecks its diff against the operations the server announces, warns about one it did not predict — a warning-qdoes not silence — and prints the route's own warnings. An answer with no operation saved nothing, so the Routine is reportedunchanged.- A Routine whose stored stages repeat a
key, or lack one, stops with exit1, writing nothing, with a message that names the stored stage and says to give it a uniquekeyin the webclient's Routine editor before re-running. - A YAML that reorders
body.stagesis sent through the update by_id, the only one that writes an order, with a warning. Apartial: trueRoutine takes the same route as any update. COTCTL_LEGACY_PATCH=1sends every Routine update through the update by_id, without trying the keyed route.1,true,yesandonset it;0,false,no,offor no value leave detection on; any other value is refused with exit2when a Routine update is about to be sent — underapply --dir -y, earlier kinds may already be written. It exists for the transition and will be removed in a later release.
routines apply --jsonprints one JSON object per Routine on stdout, errors included, asschedules apply --jsondoes. A result the keyed route answered carries the operations it announced asops, and an error it answered keeps itscodeanddata.- Two Workflow keys for the task list, each needing a backend that stores the field — an older one accepts the request and ignores the key, so the next
--dry-runlists the same change again:taskPaginationLimit, how many Tasks the task list loads per page: an integer from 10 to 100 that takes precedence over the company's limit. Omitting the key keeps the stored value;nullclears it, back to the company's limit.workflows getprints it asTasks per page.defaultSortBy, the order of the task list's default view:modifiedAt(the default) orcreatedAt; tasks are always listed newest first. Any other value is refused,nullincluded: to go back to the default, writemodifiedAt.
- Profiles that share an ApiToken.
login --tokenand--paste-tokenwarn on stderr when another profile already holds the token they save, naming it, and save the profile anyway.cotctl logout --revokerevokes the token even when another local profile still uses it, naming the profiles it leaves unable to authenticate (see Fixed for whatlogoutdoes without it).cotctl profile delete -ydeletes a profile without asking and leaves its token active. validateand--dry-runwarn about every key a survey question does not take — atreeorcreationwritten next to apropertyquestion'sfiltersinstead of inside one, ajobsoutsidepersonFilter, aminon agpsquestion, a raw-format key such asisActive, or a typo — which used to vanish from the write without a word. One warning per key names where it belongs or which types take it;+tablecolumns get the same. No exit code changes.
Changed
- A survey update's dry run names what changes on each question. The first raw re-apply of a survey built in the webclient read
Would UPDATEwithout naming a field. The diff now has one entry per question and field, such asquestions[identifier="…"].isReadOnly, and a second re-apply readsNo changes. The compact diff counts a change several questions share on one line (+ questions[].isReadOnly ×7);--diff verboselists every entry. A question or SurveyChat the update adds or removes is an entry of its own.- In
--json, a stored value the update removes, such asrequired: false, is adiffentry withkind: "deleted", and so is a question it removes. A pipeline that stops on anydeletedentry will stop on those first re-applies: check the entry'sfield, or rely ondestructiveChangesand--fail-on-destructive, which this does not touch.
- In
--diff verboselists what an entity with nothing to change keeps, under itsNo changesline — a state machine whose declaredcardLabelsequal the stored ones shows= cardLabels (preserved), which only--jsoncarried. The text diff of a Workflow apply also names card labelscardLabels, the YAML key, where it printeddynamicPropertyTypes;--jsonkeepsfield: "dynamicPropertyTypes".- A Property whose
idthe backend answers with a404fails alone.properties apply,apply -fandapply --dirreportProperty with id '<id>' was not foundand still exit1, but now apply the other Properties of the same file, which the404used to stop. Fix or remove such anidfirst if you relied on that stop.apply --dirstill stops after that file unless--continue-on-error. - The embedded
cotctl-routines,cotctl-botsandcotctl-workflowsskills give every stage that can fail an error path. They have Claude propose a handler for each stage that sends an email or a message, calls an endpoint, invokes a Routine or writes what the backend can refuse, instead of writingERROR: "", and ask before leaving one out. They pin the bot versions that report a failure onERROR—PBEmail3.0.1,PBMessage2.2.0,PBCreateTask2.0.1,PBChangeState2.1.0— rename an existing stage'snextwhen they pin it, say where noERRORbranch can catch a failure, and test both branches withcotctl routines testandcotctl logsbefore a Routine or a bot goes live. Runcotctl skills installagain to get them. cotctl login --token -reads the token from stdin before anything else — before discovering the API URL or sending any request — as--token @<path>and a literal value already did, so an empty, oversized or stalled stdin fails first.
Fixed
- A simplified survey re-apply no longer erases
exec.onChange,exec.presaveandexec.filter. The simplified export left them out and the apply never sent them, so re-applying a simplified export erased them from every question and+tablecolumn that stored them. Both formats now export and send them as written, and warn that the webclient never runs them — and that saving the survey from the webclient's builder removes them. - Survey exports that pass
validateagain.surveys export --format rawwrites anexec.onPlay.buttonsaved without some of its keys, which made the export fail its ownvalidate.surveys export --format rawskips a SurveyChat of a type no survey update accepts back, such astext/system, with a warning that applying the export deactivates it; it used to write it, andvalidaterefused the file. The dry run warns about it too, and--fail-on-destructivelets it through.surveys exportwrites a job-title filter stored as"*"(asjobs: "*") or as a legacy single code (as a one-code list), which it used to leave out. A stored list holding"*"exports asjobs: "*", with a warning that the next apply writes it back as the string.
- Dry runs that announced a write the apply then refused. Each now reports the apply's error and exit code:
- a Workflow whose state machine references a PropertyType or Property that does not exist — a
cardLabelsorallowedExtensionscode, the state machine'spropertyType, its asset'spropertyType, a generic asset'sproperty, or a State'sproperty. It used to show them as planned changes and exit0, and the apply stopped withPropertyType "<code>" not foundorProperty "<code>" not found. Underapply --dir --dry-run, a PropertyType or Property the same directory declares counts as present; - a Property YAML with an
id: the dry run read the Property bycode, so anidwith a new code, anidwith another Property's code and anidthe backend does not hold announced a create or an update the apply refuses. It now reads byid, as the apply does, and refuses those and a changedpropertyType; - a Property
codelonger than 50 characters on a create, and a schema nodekeythe backend refuses on a node it creates — it must be 3 to 50 characters matching^[a-z][a-z0-9_]*$. Both failed the apply with a400;validatewarns about both; - a
COTPropertyvalue of the wrong shape — a single value in anisArraynode, a list in a single-value node, an emptyrequirednode, a list outsidearrayMin/arrayMax— which failed the apply with a400. It now fails that Property alone. A stored value of the wrong shape fails a write that changesschemaInstance, with an error that says it is the stored value; - a survey under
--skip-semantic-validationwhose shape the apply refuses when it builds it.
- a Workflow whose state machine references a PropertyType or Property that does not exist — a
- A
COTPropertynode takes a Property code. The apply resolves the code of each node to the_idthe backend stores, where it resolved codes only in thetype: COTPropertyslice at the root ofschemaInstance, so a node given a code passedvalidateand the dry run and failed the apply with a400. A code that names no Property fails only that Property, in the dry run as in the apply. A node namedpropertyTypeorpropertyTypesis now read as a node. Underapply --dir --dry-run, a reference to a Property an earlier file creates shows as<id of <code>, created by this batch>. cotctl logoutno longer revokes an ApiToken another local profile still uses.login --tokenand--paste-tokencan save one token in several profiles, and alogoutof any of them revoked it for all. It now removes only the profile you named, keeps the token active and names the profiles that still use it; the last of them to log out revokes it. Only the profiles on this machine are checked: a token also kept as a CI secret is still revoked by the last locallogout.- Logins that no longer leave an orphan ApiToken.
cotctl loginasks whether to overwrite an existing profile before it authenticates, so answeringnmints nothing — it used to mint a token, leave it active with no profile, and could deactivate the token the kept profile held. The automatic re-login, when a profile's ApiToken expires or is revoked mid-command, checks the user before it mints a new token; and when the profile cannot be saved, on a full or read-only disk, it names the token it minted and where to revoke it. schedules listshows the schedules you expect.- It is ordered newest first, so
--type allshows the most recent schedules instead of the oldest ones in the company. - It reads beyond the first page, up to the newest 1000 schedules, so
-labove 100 works. Where most schedules were canceled ones of SLAs,--type allcould show1 schedule(s). When it stops at 1000 and the server holds more, it says so on stderr. -sfilters, by the schedule's code or the name or description of its bot, case-insensitively; it returned the same listing as without it.--no-cronlists only one-shot schedules; it returned the cron ones too.
- It is ordered newest first, so
-lonschedules logs,webhooks listandwebhooks logsdoes what it asks. A negative value reached the backend as written, and onschedules logslifted the 100-row cap —-l -1returned every log of the Schedule; a0or a non-number was replaced by the backend's default of 10 rows; and a value above 100 onschedules logswas cut to 100. Each now exits2before any request. Every value from 1 to the cap is sent as before, and the defaults are unchanged.apply --dirnames the files a run that stopped early never reached, on stderr under the summary:Not reached, the run stopped before them: …. The summary'sskippedcount only covers what the run chose to skip, so a run that stopped at an error said0 skippedand nothing about the files after it.--legacy-replace-workflowsworks over stored card labels on a backend that protects them from the releases that erased them. The labels end up cleared as before.- Clearer messages.
- The SLA commands and
apply --dirname the inactive Workflow a state machine belongs to, instead of saying it does not exist and asking you to apply a Workflow that is already applied. The SLAs of an inactive Workflow are still neither read nor applied. - A
partial: truedocument that names an element no stored one holds — a misspelledproperty,target,codeor stagekey— leads withState "<x>" is not stored in <list>, so partial: true would add it as a new state, and nothing stored completes what it leaves out:instead of naming only the field the new element lacks. validate --workflownames an inactive form by its code, marked(inactive), and one no survey of the company answers to as the Workflow stores it, marked(not found). A referenced form that is active no longer warns.- A question's context naming a
+tablecolumn (responses#<column>) outside the table warns that it resolves empty, where it said the identifier does not exist in the survey. - An apply whose write the server answers with no document says it could not confirm the write, instead of claiming nothing was written. It still exits
1. logs pull --parts stage:<key>warns once per log that has no stage by that key, and still writes it.
- The SLA commands and
- The embedded skills' examples use bots that run. They used
PBSendMessage, which is not a registered bot type, and aPBEmailwithto; they usePBMessagewithcontent,contentType,sentByandchannelIds, andPBEmailwithtargets,subjectandcontent. Thecotctl-workflowsskill'sPBCreateTaskhas thenameevery version needs, and its Workflow example's survey-triggered and sub-task bots now do their work. Thecotalker-docsskill tellslogoutandprofile deleteapart, and thecotctl-applyskill gives apartial: trueWorkflow the merge refuses its exit2. Runcotctl skills installagain to get them.
Docs
- Give every stage that can fail an error path, a new section of the Routine guide: a stage that fails onto
ERROR: ""ends the run unnoticed while the run is still logged as executed. It says where anERRORbranch cannot see the failure — the default version ofPBEmail,PBMessage,PBCreateTaskandPBChangeState, aPBScriptstage invoking a Routine, a bot that throws its failure — and how to prove both branches withcotctl routines testandcotctl logs. - Every page of the bot catalog does the same. Where a bot reports its failures on
ERROR, its examples send them to anotify_failurestage, a pinnedPBMessage; where it throws them or reports none —PBGiphy,PBWhatsApp, theST*bots,CBCheckOTsched— the page says noERRORbranch catches them. The pages of the four bots above say which versions report onERROR, and warn that pinning an existing stage renames itsnext(DEFAULTandCREATEDbecomeSUCCESS,NOT-CREATEDbecomesERROR) and validatesdatathe default barely checks — whichcotctl validatedoes not catch. - Corrections worth checking if you configured from earlier pages:
PBCalendarreports every failure onERROR, although its only version declares justDEFAULT;PBConditional'sTRUEandFALSEkeys must be quoted — YAML reads them bare as booleans, and the stage never branched;- no
PBSheetstage can be applied and run throughcotctltoday, and its page says why; - a
PBScriptstage takesERRORonly when the invoked Routine returns no results, not on a failure inside it; - the default
PBChangeStateacceptsquietand ignores it; only2.0.0refuses it; - the examples no longer use
PBSendMessage, which is not a registered bot type, butPBMessagewith its owndata; - the examples of the error-path bots no longer put
{{…}}placeholders in botdata, which is not a template: the placeholder reached the bot as literal text, and a pinned version that validates the field refused it on every run. The COTLang reference no longer lists{{…}}among its expressions; cotctlprints no warning for aschemaInstancekey the PropertyType does not define: it sends the key as written. The Properties page now says so; check a type's keys withcotctl property-types getbefore writing them.
- The Authentication page gives, in one place, which commands exit
2and which exit1whenCOTCTL_COMPANY_IDdoes not match the token, and tells a script to test for a non-zero exit.
Migration
- Install 0.16.0 —
npm install -g @cotctl/cli@0.16.0. In CI, move the pinned version on purpose, after reading the breaking changes above. - Before the first
apply --diron 0.16.0 over a directory with SLAs, review the files after the first SLA file, or run the sameapply --dirwith--dry-run: earlier versions never applied them. - Re-check every branch on
$?against the table in Exit codes. In particular, handle5— updatecotctland run again, or setCOTCTL_ACCEPT_ADVISORYto the id the message names to run the affected version anyway. - Expect one npm lookup per job even with
COTCTL_NO_UPDATE_CHECKset, on a runner that starts with an empty home directory: it no longer silences the advisories. - Check scripts and aliases that pass
-ctologin: the profile is saved under that name, and a-cnaming an existing profile now asks, fails without a terminal, or is overwritten with--yes. - Run
validate --dirover your survey directories and fix what it refuses: a simplified exec stage that is not an object, or whose JavaScript does not parse — every apply,--dry-runincluded, now refuses it too, with exit2. Runvalidate --remotewith a profile orCOTCTL_TOKENandCOTCTL_API_URL, and fix any Survey a Workflow names that exists nowhere. - Fix
COTPropertyreferences to name active Properties of the node'ssubType, without empty or repeated items; shorten a schema nodekeypast 62 minus the type'scodelength; and apply a Properties export taken with 0.16.0 only with 0.16.0 or later. - Re-check pipelines that stop on any
deletedentry of a survey dry run's--jsondiff: check the entry'sfield, or rely on--fail-on-destructive. - Run
cotctl skills installagain to get the skills' error-path guidance and corrected examples.
0.15.1 — 2026-10-27
A patch release for the AI assistant integration. cotctl now connects Claude to Cotalker's production documentation server, https://codex.cotalker.com/mcp, and a connection installed with the global scope now reaches Claude Code — before this release it never did. Nothing in your YAML or your profiles changes; a script that runs cotctl mcp should check the exit-code changes below.
A connection you set up with an earlier version keeps its old URL until you install it again: the Migration checklist at the end of this section says how.
Exit codes
These cotctl mcp cases now exit 1 where 0.15.0 exited 0:
| Command | Before | Now |
|---|---|---|
cotctl mcp list, cotctl mcp indices, cotctl mcp remove, when the global configuration file is not valid JSON | 0, ignoring that file's servers (in 0.15.0 the file was ~/.claude/settings.json) | 1, with an error that names the file — now ~/.claude.json. --scope local does not read it |
cotctl mcp remove <name> when no server is configured | 0, with No MCP servers configured. | 1, reporting that <name> was not found |
cotctl mcp remove <name> for a server that is only in ~/.claude/settings.json, or for a .mcp.json entry that is not an HTTP server | 0, and the entry was removed | 1, reporting that <name> was not found; the entry stays |
Fixed
- The documentation server answers again.
cotctl mcp installandcotctl skills installconfigured the staging server, which no longer answers:cotctl mcp installandcotctl mcp indicescould not list its indices, and Claude got no documentation through the connection. They now use the production server, which publishes two indices —cotctl-documentationandcotalker-implementation. - A global connection reaches Claude Code.
cotctl mcp install --scope globalandcotctl skills install --globalwrote the server to~/.claude/settings.json, where Claude Code does not look for MCP servers, so it never appeared inclaude mcp list. They now write it to~/.claude.json— or$CLAUDE_CONFIG_DIR/.claude.jsonwhen that variable is set — the fileclaude mcp add --scope useruses. Every other server and setting in that file keeps its value and the file keeps its indentation; a file that is not valid JSON is left untouched and the command stops with an error. Installing a global server, or removing one that is in~/.claude.json, also removes the same-named entry an earlier version left in~/.claude/settings.json, and says so. cotctlonly manages HTTP servers.cotctl mcp list,cotctl mcp indices,cotctl mcp removeandcotctl skills uninstallconsider only HTTP servers with a URL — the kindcotctlwrites — in both.mcp.jsonand~/.claude.json, including HTTP servers you added yourself. Astdioorsseserver, or one with notype, is not listed and cannot be removed throughcotctl.
Docs
- MCP integration describes the production server: its two indices, where each scope stores the connection, and how to move one made with an earlier version. The index names it used to show —
cotctl,cot-apiandcot-models— are not published by the production server, which answers400 No valid indices foundto them.
Migration
- Install 0.15.1. A 0.15.0 installed with
npm install -gon macOS or Linux updates itself the first time you run a command in a terminal, and 0.14.x asks first. In CI, with-y, with the standalone binary or on Windows, runnpm install -g @cotctl/cli@0.15.1or download the binary. Updatingcotctldoes not move a connection you already installed: that is step 2. - Install the documentation connection again if you set it up with an earlier version: run
cotctl mcp installwith the same name and scope, and choose Replace existing instance if it asks — or runcotctl skills install(with--globalfor the global scope) and accept the MCP prompt, which rewrites the defaultcotalker-ragserver with the default indices. A global connection from an earlier version never worked, so it needs this step too. An entry an earlier version left only in~/.claude/settings.jsonis not found bycotctl mcp remove: install it again with the same name to move it, or delete it by hand. - Replace old index names in setup scripts and in servers you registered with
claude mcp add: usecotctl-documentationandcotalker-implementation, or leave?indices=out to search both.--indicesis not checked against the server, so an old name produces a connection the server rejects. - Check the result with
cotctl mcp list: each Cotalker server should showhttps://codex.cotalker.com/mcp. It also warns about any server an earlier version left in~/.claude/settings.json.
0.15.0 — 2026-10-23
The headline is cotctl logs, a new command group that reads what a Routine did when it ran — the context the run received, the configuration it ran with, what each stage returned and its error — and saves it as JSON files, without copying anything out of the webclient. It needs backend release-5.13.0 or later in the environment you point it at.
The rest of the release makes survey validation agree with what the server and the webclient accept, keeps a survey's stored placeholders and input labels across re-applies, makes validate --workflow check the forms a Workflow is actually wired to, and makes cotctl login and COTCTL_TOKEN accept only ApiTokens. Most of the nine breaking changes are YAML that used to pass and is now refused before anything is written. The Migration checklist at the end of this section lists everything to do.
⚠ Breaking changes
Grouped by theme. Each group says who it affects and what to do.
Survey YAML that validation now refuses
Each of these used to pass validate. It now fails validate with exit 1, and every apply, dry runs included, refuses it with exit 2 before anything is written.
A
subtypeits question type does not take, on atextinput,textnumber,listquestionordatetimequestion or+tablecolumn, in both formats. It used to pass: an unchanged export of a survey that stores one —short_texton atextnumber, say — re-applied with exit0, and an apply with something to write failed with the server's500. The error lists the values the type takes, and--skip-semantic-validationdoes not turn the check off. The one exception islong_texton atextinput, a legacy value older surveys store: it is accepted, with a warning, and sent asshort_text, so the first apply of an unchanged survey that stores it writesshort_text(Would UPDATEin a dry run) and the ones after it change nothing.A
propertyquestion'stree.filterorcreation.permissionsthat is not a list. Either key used to be refused only when empty, so a non-empty string went through. It is a semantic check, so--skip-semantic-validationturns it off. The other way round, an empty list is now accepted (see Fixed).dependsOn,showWhenorresetIdentifiersat the root of a+tablecolumn, in both formats. They passed, and the apply dropped them without a word, so the condition never reached the server. No export writes them there.Who this affects: anyone with hand-written survey YAML, and anyone re-applying the export of a survey that stores a
subtypethe server does not accept.What to do:
- Set each
subtypeto a value its type takes —short_texton atextinput;number,integerorratingon atextnumber;listortoggleon alistquestion;absolute,relativeorcreatedAton adatetime— or remove the key, which is always valid. - A
datetimewith asubtypealso needs a numericminandmax, which neithervalidatenorapplychecks: without them the webclient refuses every answer (absolute) or accepts a single day (relative,createdAt). OnrelativeandcreatedAtthe limits are seconds before and after the reference date — copy them from the export of a survey whose limits were set in the webclient. Avoidabsolute: the webclient refuses every answer even with the limits its own builder saves, so userelativeorcreatedAt, or leavesubtypeout. - Write
tree.filterandcreation.permissionsas lists:filter: [<value>]instead offilter: <value>, and the same forpermissions. - Remove
dependsOn,showWhenandresetIdentifiersfrom the column — the apply never sent them, so the stored survey does not change. A column takes no condition at all (itsconditionalDisplay, orcommandin the raw format, is refused too): put the condition on thetablequestion itself, in its ownconditionalDisplay.
- Set each
What a survey update writes
An update in the simplified format keeps each question's stored
display. Whensurveys apply,apply -forapply -dupdates a survey, each question and+tablecolumn that keeps its identifier and its type keeps its storeddisplay— a field's placeholder, the labels of adatetime's inputs — where the update used to send its type's default: an empty placeholder, and the default Spanish labels on adatetime. So an unchanged YAML now writes something different over a survey whosedisplaywas set in the webclient or by a raw apply; over a survey the simplified format created and nobody edited since, it writes what it wrote before. Fixed has the details.A two-entry chat bubble — a
+textfollowed by a question whose type takes a title — is read as that title and its question, whatever the+textis called. A+textused to count as a title only when its identifier ended in_labelor_<digits>, or waslabelQuestionfollowed by its question's identifier. Over a bubble like[+text mileageHeading, textnumber mileage], the same simplified YAML now rebuilds the stored title in place, keeping its identifier, where it used to createmileage_labeland deactivate the stored+text. So it writes something different, andsurveys apply --dry-run --fail-on-destructiveno longer exits2on it.Who this affects: anyone who relied on a re-apply to reset a placeholder or a label, and pipelines gated on
--fail-on-destructiveover surveys with such bubbles.What to do: to put a stored
displayback to its type's default, set it in the raw format (surveys export --format raw, edit thedisplay, apply that file) or in the webclient.surveys apply --legacy-replacestill sends the default, but it also wipes every field the YAML leaves out. Nothing is needed to keep a survey with such a bubble: a gated pipeline that relied on that exit2now gets, at most, asurvey.title-conditions-droppedwarning, when the title stores a condition of its own. A YAML exported earlier, with the title as atextquestion, applies as it did.
Record ids must be ObjectIds
validate and every apply, dry runs included, refuse an id that is not a 24-character hex ObjectId on an AccessRole, Property, PropertyType, Survey, User or Workflow, partial: true fragments included. The id is refused before the record is looked up by it; an apply that reads catalogs first, such as a User's JobTitles and AccessRoles, still reads them. Two cases that passed now fail:
id: "", which every apply treated as absent;- a malformed
idon a User or a Survey, which fell back to the email or thecodewhen the server answered404.
The refusal exits with the code its kind gives any refusal, with or without --dry-run, through apply -f, apply --dir and the kind's own apply: 1 for an AccessRole, Property, PropertyType or Workflow, 2 for a User or Survey. validate exits 1 for every kind.
- Who this affects: anyone whose YAML carries an empty
id, or anidcopied wrong. - What to do: remove the
id, or set it to the record's_idas its export writes it — a# id:comment for an AccessRole, Property, PropertyType, User or Workflow, and anid:field for a Survey.
cotctl login and COTCTL_TOKEN accept only ApiTokens
cotctl login --token and --paste-token refuse a token they cannot recognize as an ApiToken — one whose type claim is missing or is not api-token, such as a session JWT copied from the browser, or one without a company or an _id claim — with exit 1 and before sending it anywhere, where they used to save it as an ApiToken profile. --allow-unverified-company does not waive the company claim. COTCTL_TOKEN applies the same check, so it now also refuses a token without a type or an _id claim.
- Who this affects: anyone who logs in with a token copied from the browser, and pipelines that pass a token through
COTCTL_TOKEN. - What to do: mint an ApiToken with
cotctl login, or have an admin issue one from the webclient's ApiTokens panel, and use that one instead. ACOTCTL_TOKENwithout atypeclaim may be a session JWT, which expires within 7 days, or an ApiToken old enough to predate the claim — replace it either way. A profile saved earlier from a session JWT is not checked again: it stops working when that session expires, andcotctl loginreplaces it.
validate --workflow
It can now fail, and exit
1, on a Workflow it used to report as production ready. It checks the forms the Workflow references, not only those its permissions reach (see Fixed), so the two form checks that fail rather than warn — "Manager in access roles of all forms" and "_ctrlfields hidden in forms" — can fail on a form they never saw: one without the flow's Manager permissions in itspermissionsV2, or with an editable_ctrlfield. And a survey listing that fails no longer reads as "no linked forms": every form check fails withNot checked — survey listing failed. Both reach the exit code, with or without--json.The flow-code check is now named
Flow code prefix (2-8 chars), where it said(2-4 chars): it follows the--coderule ofworkflows scaffold(see Changed). The--jsonshape and the exit codes do not change, but a script that picks that check by itsnameno longer finds it.Who this affects: pipelines gated on
validate --workflow, and scripts that read its--json.What to do: a new FAIL on a linked form is a finding the command used to miss — fix the form as the check says. A FAIL that reads
Not checked — survey listing failedis about the listing, not the Workflow: re-run once the listing answers. No flag brings back the old result. In--json, pick a check by itsid(N1for the flow-code check), which does not change, rather than by itsname.
Exit codes
These cases change:
| Command | Case | Was | Now |
|---|---|---|---|
validate, every apply | A subtype its question type does not take | 0 from validate; an apply with something to write failed with the server's 500 | 1 from validate; 2 from every apply, before anything is written |
validate, every apply | A property question's tree.filter or creation.permissions written as a non-empty string | 0 | 1 from validate; 2 from every apply |
validate, every apply | The same keys written as an empty list | 1 from validate; 2 from every apply | 0, accepted |
validate, every apply | dependsOn, showWhen or resetIdentifiers at the root of a +table column | 0, and the apply dropped them | 1 from validate; 2 from every apply |
validate | An id that is not a 24-character hex ObjectId, id: "" included | 0 | 1 |
| Every apply, dry runs included | id: "" on an AccessRole, Property, PropertyType, Survey, User or Workflow, or a malformed id on a User or Survey | 0 | 1 for an AccessRole, Property, PropertyType or Workflow; 2 for a User or Survey |
login --token, login --paste-token | A token that is not an ApiToken, such as a session JWT | 0, saved as a profile | 1, nothing saved |
validate --workflow | A referenced form fails a form check, or the survey listing fails | 0 | 1 |
validate --dir --remote | Any run | 1, the combination was refused | 0, or 1 when an offline or remote check fails |
surveys apply --dry-run --fail-on-destructive | A two-entry bubble whose +text title did not follow the old naming | 2 | 0 |
surveys export | A chat bubble the survey read returns empty | 2 | 0, the bubble skipped with a warning |
schedules get, export, activate, deactivate, logs | A Schedule whose code contains # | 1, not found | 0 |
A malformed, non-empty id on an AccessRole, Property, PropertyType or Workflow already failed with 1, as not found; it is now refused before the lookup, with the same code.
The new cotctl logs commands have exit codes of their own: 3 when some log was not delivered (not the partial write it means on apply), and 4 when the environment's backend cannot serve the logs yet. See Added.
- Who this affects: any script or pipeline that branches on
$?. - What to do: re-check each row your scripts rely on. Even a pipeline that only tests for a non-zero exit is affected by the rows whose old or new code is
0.
Added
cotctl logs: read what a Routine did when it ran, as JSON files. The scheduler keeps one log per run for 7 days: the context the run received, the configuration it ran with, what each stage returned and its error. The commands need backendrelease-5.13.0or later, and a profile whose user has theadmin-schedules-readpermission, or one that includes it, such asadmin-schedules-write.logs listlists the runs that match the webclient's filters, newest first, a page at a time:--workflow(alone or with--stateor--sla),--bot,--schedule,--routine,--tag-value,--owner,--op, and the dates--from,--toand--since. It prints a table, or with--jsonthe page and the count of every matching run.logs get <logId...>downloads logs by id, one file per log, named after the Schedule, the run's start in UTC and the log id.--stdoutprints the logs instead of writing files.logs pulldownloads every run the same filters match. Beyond one page of 100 runs it asks first, with an estimate of the time it takes;--yesskips the question, and with no terminal to ask on, the run stops with exit2instead of waiting. It refuses a pull that matches more than--maxruns, 500 by default; raise--maxto download more.--partsdownloads only part of each log:log,context,routine,results,error, or one stage withstage:<key>.- A log of 2 MiB or more, which the scheduler keeps in S3, arrives like any other. When its download URL has expired, the log is reported as expired — with the instant the URL stopped working, when the URL carries one — and no file is written for it.
- Log files are owner-only (
0600) on Linux and macOS, a replaced copy included: a log carries what its run received and returned. - For scripts,
--jsonongetandpullprints a manifest of each file written and of each log missing, expired or failed. Exit3means some log was not delivered, and4that the environment's backend has no log reader yet, or cannot filter by Routine — both arrive with backendrelease-5.13.0, which the no-reader message names. --routinecannot see every run, and says so each time it is used: an interrupted run, a Routine called by another Routine, and a run ofroutines test, which--owner TESTlists instead.- Known limitation: an
--ownerwith no--bot,--workflowor--tag-valuebeside it can answer504in a company with a very large number of Schedules of that owner. A shorter date window does not help; one of those three filters does. - This is not the audit log. Who changed a Routine's configuration, and when, is a different record, and the command name
audit-logsis reserved for it. - A new embedded skill,
cotctl-logs, lets an agent use these commands:cotctl skills install cotctl-logs.schedules logs <code>still shows the recent log entries of one Schedule in the terminal;cotctl logsfinds runs across Schedules — by Workflow, Bot, Routine and the other filters — and saves each run's full log as a file.
validate --dir --remoteruns the remote checksvalidate --file --remoteruns, on every Survey and Workflow that passed the offline checks; apartial: trueWorkflow fragment is not checked remotely. The combination used to exit1.--jsongains aremoteResultskey, present only with--remote; its results count insummary, and a FAIL exits1. An API error on a Survey is reported as that Survey's FAIL and the documents after it are still checked; an expired session or a missing profile stops the run.validate --workflowwarns about each form the Workflow references that the survey listing does not return — a deleted or inactive survey — in a new check, "Referenced forms exist and are active", which names the reference as the Workflow stores it: an_idor a code.New survey warnings from
validateand every survey apply, dry runs included. None of them refuses a file or changes the exit code, and-qsilences them onapply:- a
showWhenthe webclient cannot honor: an empty one, which hides the question for good, and one with more than one entry, of which the webclient reads only the first (see Docs). A rawcommand.valueson a question with anisCommandedgets the same warnings. The server stores both shapes, so neither is refused; - an
exec.onChange,exec.presaveorexec.filterstage, which the webclient never runs. In the raw format it is sent and stored as written; in the simplified format it is never sent, so an apply also removes it from a question that stores it; subtype: long_texton atextinput, which cotctl sends asshort_text, as the webclient's survey builder does when it loads the question. Writeshort_textto silence it.
- a
Two new
ruleIds in the--jsonoutput of a survey dry run:survey.empty-chats-deactivated, when the apply deactivates a SurveyChat the YAML cannot write — a question bubble the survey read returns empty, or a text bubble the simplified export leaves out, which a re-apply used to deactivate with no line in the dry run — andsurvey.title-conditions-dropped, when it drops a title's own condition. Both are warnings:--fail-on-destructiveexits2only on adangerfinding.
Changed
- The confirmation of
schedules activateandschedules deactivatenames the Schedule's owner. When the owner is notAdminSchedules— as with the Schedules the platform creates for SLAs and State changes — a warning also goes to stderr before the command acts, with-ytoo. Nothing is refused and the exit codes do not change. workflows scaffold --codetakes 2 to 8 characters, with digits after the first letter (qa011): a lowercase letter, then lowercase letters or digits. It took 2 to 4 lowercase letters, and every code it took before is still accepted.validate --workflowchecks a flow against the code it was scaffolded with. The flow-code check and the checks on form, PropertyType and Property code prefixes read the flow code from the states PropertyType thatworkflows scaffoldgenerates, so a flow fresh out ofworkflows scaffold --name purchase-orders --code pono longer warns that its codes lack the prefixpurchase. When that PropertyType carries no such code — as in a flow built in the webclient — they fall back to the part of thenameCodebefore its first underscore, as before. The flow-code check applies the--coderule, so a prefix of 5 to 8 characters, or one with digits, now passes. These checks only warn, so the exit code does not change.workflows scaffold --output-diraccepts an existing directory. It refuses — exit1, naming the files and writing nothing — only when one of the six files it generates is already there; it used to refuse any existing directory, even an empty one. The--stateshelp now shows display names as typed ("Approved,In purchase"), which is what the flag has always kept.
Fixed
- Lookups that found the wrong record, or none.
routines get,routines exportandroutines testlook up exactly the code they are given. A code containing#,?,/,\or%could make the lookup find another routine —routines test 'daily#x' -yresolved, and ran, the routinedaily. The code is now sent encoded, and a Routine with another code than the one requested is now reported as not found.schedules get,export,activate,deactivateandlogsfind a Schedule whose code contains#, as the codes the platform gives the Schedules of SLAs and State changes do. They answeredSchedule "…" not foundand exited1for a Schedule that exists.
- Exports that pass
validateagain.surveys export --format rawno longer writesresetIdentifiers: [""], nor a reset identifier that names no question of the export. The empty entry the webclient's builder stores becomesresetIdentifiers: [], or thecommandis left out when the reset was all it held; an identifier naming a question the survey no longer returns — removed or deactivated — is left out, with a warning, as in the simplified format. The first apply of such an export stores an empty list in place of[""], which changes nothing in the form, and erases the left-out identifiers from the stored reset.validateand every apply accept apropertyquestion whosetree.filterorcreation.permissionsis an empty list — what the webclient saves for a tree with no narrowing, and for inline creation open to every user, and whatsurveys exportwrites back.tree.targetis still required.property-types exportleaves outmin,max,arrayMinandarrayMaxwhen they are stored asnull, andvalidatorswhen nothing is left, so the file passesvalidate.property-types getno longer printsmin: null,max: nullordefault: null.
- Survey exports that keep more of the survey.
surveys exportno longer fails on a chat bubble the survey read returns empty because its questions were deactivated or deleted. It used to exit2; the bubble is now skipped with aSKIPPEDwarning that names the SurveyChat an apply of the export deactivates, and the export exits0.- The simplified export keeps the question of a
[+text, question]bubble, with its reset, whatever the+textis called. It used to write the+textas atextquestion and leave the question out, so the exported YAML of those surveys changes. A title's own condition, help text andrequiredare not kept in the simplified format: the export warns about each and points to--format raw, and the dry run warns about the condition. - The simplified export warns about a condition operator the simplified format does not accept, such as the
=older webclient versions stored, and points to--format raw. The operator is still written as stored, sovalidatestill refuses the file, but the export now says so first.
- Re-applying a survey in the simplified format no longer empties a field's placeholder or renames a
datetime's labels. Atextinput,textnumberorpropertyquestion kept the placeholder set in the webclient only until the next apply, and adatetime's labels from the English webclient were replaced with the Spanish defaults. An update now keeps the storeddisplay, in+tablecolumns too, except where the YAML sets it: atextquestion'slabeland alistquestion'soptions[].labelare its wholedisplay, and agps,image,fileorsignaturequestion sends itslabelas the first entry and keeps the stored ones after it. A new question, a changed type, and adatetimewhosedateModeadds or drops the time input get the default. The dry run lists eachdisplaythe update changes and counts each stored one it keeps aspreserved. validate --workflowand Workflow dry runs.validate --workflowchecks the forms a Workflow is wired to. A form is linked when the Workflow references it — a StartForm'srequiredSurvey, a transition'srequiredSurvey, a State'ssurveyTriggers— or when itspermissionsV2grant one of the flow's TaskGroup permissions, and a form linked both ways counts once. Only the second kind used to count, so a Workflow wired through its States reportedNo forms linked to this workflowand its form checks checked nothing. The form-code check now names the forms it checked, and the survey listing no longer fails on a backend configured with a lower page limit.- A Workflow's dry run lists a declared
cardLabelsequal to the stored one aspreserved, so the diff alone shows that the labels survive the apply. It counts in the headline'spreservedand reaches--jsonas one morediff[]entry,field: "dynamicPropertyTypes"withkind: "preserved".
- Script checks on
+tablecolumns. Thecontextof a column is checked against its row: a sibling column no longer draws a warning, andresponses#parent#Xis looked up in the row. A root question or the table itself in a column'scontext, and a column of another table, get their own warning, since in the cell they resolve empty. A column'sonDisplay,onPlay,postsaveandonSubmitSuccesswarn that a cell never runs them, and a column'spreloadno longer draws the missing-contextwarning, since a cell runs it withsrcalone. No exit code changes. validate, dry runs and apply no longer hang on a longcodewith an invalid character near its end — a Property, JobTitle, Routine, Schedule, SLA or Webhookcode, a Routine'sdataType[].key, a Workflow'snameCodeor a StateMachine'scode. The same codes are accepted as before, and the errors that quote the pattern now write it^[a-z][_a-z0-9]*$.- Credentials and connection.
- The
[cotctl] Credentials from $COTCTL_TOKEN …line prints after the first accepted response, and never for a refused token. TheEXPIRED at …line is gone: an expired token stops before it is sent. - A
401withCOTCTL_TOKENnames the URL it was sent to and the likely causes — a revoked token, or one from another environment — instead of calling it "expired or revoked". - A trailing
/apiin--api-urlorCOTCTL_API_URLis dropped, with a notice. Requests used to go to/api/api/…and fail with a404. - A response that is not JSON names where its URL came from:
COTCTL_API_URLor the profile. The error for a command run without-cnamesCOTCTL_TOKENandCOTCTL_API_URL. login --tokenand--paste-tokenno longer invent an expiry for a token from the ApiTokens panel, which has none: they reportno expiry, asCOTCTL_TOKENdoes. A profile saved earlier keeps the invented date until the nextcotctl login.
- The
- Messages.
- A Survey's validation messages name a question type the way its YAML writes it:
columns is only valid on a `type: table` question(or+tablein achat[]YAML) instead of the internal content type, and a refused type change of a saved table column reads in the YAML's own keys —type: textnumber (subtype: number) → type: textinput,dateMode: date → date_time. What is refused did not change. - A repeated
identifierin a simplified Survey points at the repeat and names the question that already has it —questions[2].identifier: Identifier "x" is already used by questions[0] (label "First field")— where the error named itself. validate --workflowon a Group that is not a Workflow says so, with the messageworkflows getgives, instead of a rawAPI Error 404. It still exits1.
- A Survey's validation messages name a question type the way its YAML writes it:
Docs
- The skills embedded in the CLI describe 0.15.0:
cotctl logsand the newcotctl-logsskill, what a survey update keeps, thesubtypevalues each question type takes, the raw format's round trip, and theworkflows scaffoldrules. - Earlier guidance was corrected on these points — worth checking if you configured from it:
- Not every
showWhenentry has to hold. The webclient reads only the first entry, so a list of them is neither an AND nor an OR: twoeqentries only ever match the first value, and a numeric range written as agteentry and anlteone is only thegte. For an OR, write oneop: regexentry with|between the values.regexnever matches atextnumberor adatetimeanswer, so an OR cannot be written on those. - The raw format does not guarantee a re-apply that changes nothing. The first apply of a raw export over a survey built in the webclient usually still sends an update (
Would UPDATEin a dry run), because what the webclient stored differs from what a raw apply writes; from the second apply on, the raw round trip changes nothing. The error that points a failed simplified export to--format rawnow says this too. - The
cotctl-routinesandcotctl-botsskills point tocotctl logsfor a Routine's or a Bot's runs, where they said the backend had no way to read them.
- Not every
Migration
- Install 0.15.0 —
npm install -g @cotctl/cli@0.15.0. From 0.14.x, cotctl announces it by itself and, in a terminal, offers to install it (a standalone binary is shown the command instead); in CI or with-yit only prints a notice. It never installs a minor version unasked, since one carries breaking changes, andCOTCTL_NO_UPDATE_CHECK=1turns the check off. In CI, move the pinned version on purpose, after reading the breaking changes above. - Run
validate --dirover the directories that hold your Surveys, Workflows, AccessRoles, Properties, PropertyTypes, JobTitles and Users before you move a pipeline to 0.15.0 — it does not recognize the other kinds — and fix what it refuses: asubtypeits question type does not take, atree.filterorcreation.permissionsthat is not a list, a condition at the root of a+tablecolumn, anidthat is not a 24-character hex ObjectId. Add--remoteto run the remote checks on every Survey and Workflow too. - Give every
datetimewith asubtypea numericminandmax— seconds onrelativeandcreatedAt— and preferrelativeorcreatedAtoverabsolute, or leavesubtypeout. - Replace any token that is not an ApiToken in
COTCTL_TOKENand incotctl login --tokenor--paste-token— a session JWT copied from the browser above all — with one minted bycotctl loginor issued from the webclient's ApiTokens panel. - Re-check pipelines gated on
validate --workflow: it now checks every form the Workflow references, and in--jsona check is found by itsid, not itsname. - Re-check pipelines gated on
surveys apply --dry-run --fail-on-destructiveover surveys whose+texttitles do not end in_label: the dry run no longer exits2on them. - Reset a placeholder or an input label in the raw format or in the webclient: a simplified re-apply now keeps the stored one.
- Before using
cotctl logs, check that the environment runs backendrelease-5.13.0or later, and that the profile's user hasadmin-schedules-read, or a permission that includes it such asadmin-schedules-write. - Re-check every branch on
$?against the table in Exit codes.
0.14.0 — 2026-10-10
A large release with one idea behind most of it: an update now changes only what your YAML says. Until now every apply filled each key the YAML left out with its default before sending an update, so re-applying a file could quietly empty permission lists, reactivate records or stop a schedule's cron. From this release an omitted key keeps its stored value, an element of a keyed list is matched with its stored counterpart, re-applying a YAML that changes nothing sends nothing, and an export writes only what is stored. On top of that, partial: true lets a document edit one element of a long list — one schema node, one bot stage — without restating the rest.
The release also moves many failures from the middle of an apply to before anything is written, makes the dry run report what the apply will actually do, and brings many exit codes in line with their contract (see Exit codes below). And it is the first version that checks for new versions of itself, which means the move from 0.13.x to 0.14.0 is still a manual install — see Version updates under Added. The Migration checklist at the end of this section lists everything to do.
⚠ Breaking changes
Grouped by theme. Each group says who it affects and what to do.
Updates keep what your YAML leaves out
An update used to fill every key the YAML omitted with its default — [] for a workflow's five permission lists, a user's roles or a job title's lists, 7 for hideClosedAfterDays, true for isActive, 60 for a schedule's timeoutMinutes — and overwrite whatever the server had. Now an update carries only the keys the YAML declares, and the server keeps the rest. A create still fills every default. The same rule reaches inside nested structures:
- Objects the server replaces whole are completed from the stored one, so a key left out of them keeps its value: an SLA's
start,end,dataandpb; a bot'sparametrizedBot; a schedule'sbody; a state machine'sasset; a survey'snameTranslations,editable,hiddenandpost; a user'shierarchy; and a workflow slot's bot when the stored slot holds one bot. A declared list is still the complete list — except a property type'sschemaNodes, which keep the nodes the YAML leaves out. A webhook'scontextand each survey question still travel as written. - List elements are matched with their stored counterpart, and keep the keys they omit: a bot's commands by
slashCmd(a survey command bysurveyIds) and theirargumentsbyname; the stages of a bot, a routine, an SLA'spband a schedule'sbodybykey, as long as they keep their bot type; a routine'sdataTypeinputs and a property type's schema nodes bykey. So a command that omitsisActive: falsestays deactivated, and a stage that omitsisCriticalkeeps it. A stage is completed at its own level only: adataornextit declares travels whole. A command that is neither a slash nor a survey command is never matched and travels as written, andapplywarns on stderr which stored keys it loses. In a routine'sdataTypeand a schedule'sbody.stages, which the server updates by position,applyalso warns which keys an element keeps from the stored one it lands on. - A stage that omits
versionkeeps its stored version;version: null(or"") puts it back on the bot type's default. In a schedule, which already kept the stored version, what is new is thatversion: nullunpins the stage. - A survey trigger that omits
botskeeps the bots stored for that survey. It used to be sent with an empty list, which wiped them. - A property type update sends
viewPermissionsas written. It used to send[]unless the YAML saidhidden: false. An update that writeshidden: trueand noviewPermissionsstill removes them, now with a warning. - A written
[]now empties three lists that used to ignore it: a bot'sextraData, a workflow state'snext, and a user's wholehierarchywhenboss,peersandsubordinateare each written as[]— a list left out keeps its stored value. - Updating an inactive User or JobTitle whose YAML omits
isActivesucceeds, and the record stays inactive. It used to be refused — with exit2fromusers applyandjobtitles apply— unless--allow-reactivatewas passed, which then reactivated it.
Two paths keep the old behaviour on purpose: --legacy-replace-workflows (on apply and workflows apply) and surveys apply --legacy-replace still build the update from the create defaults, so a field the YAML omits is still wiped.
Who this affects: anyone whose YAML relies on leaving a key out to reset it, or on a key left out of a nested object being dropped.
What to do: write every key an update must reset, with the value you want:
[]to clear a list — a workflow's permission lists, a user'saccessRoles, a survey trigger'sbots, a property type'sviewPermissions— and, to empty a user's wholehierarchy,[]in each ofboss,peersandsubordinate;""to clear a text inside one of the objects above — a translation left out of a survey'snameTranslationsnow stays stored until the YAML writes it as"";isActive: trueto reactivate a record (plus--allow-reactivatefor a User or a JobTitle) or a bot command,isCritical: falseon a stage,required: falseon a routine input;- the default itself wherever you relied on it, such as
hideClosedAfterDays: 7ortimeoutMinutes: 60; version: nullon a stage that must go back to its bot type's default — and in a schedule, remove aversion: nullthat should keep the stored version.
The other way round, leave out a bot's
extraData, a state'snext, or a user'shierarchyor any one of its three lists, to keep them.cotctl workflows scaffoldwithout--stateswritesnext: []on thein-progressstate: if that state got transitions in the webclient, remove the line or write them before re-applying. A pipeline that relied on that refusal to leave an inactive User or JobTitle untouched now gets0with the rest of the YAML applied — take the record out of the YAML instead.
Exports write only what is stored
Every export used to write a key the stored entity lacked with its default, and re-applying that export sent those keys as changes. Now a key the entity lacks stays out of the export, and re-applying an unchanged export sends nothing.
Keys an export no longer fills in, by kind
roles export:description.property-types export:isActive,hidden,viewPermissions,propertyImportPermissionsandschemaNodes; in each nodeisArray,validators.required,weight,isActiveandisHidden.properties exportandwebhooks export:isActive.jobtitles export:isActive,accessRoles,allowedExtensionsandelements.users export:name.lastName,name.secondLastName,phone,accessRoles,extra,settingsand eachhierarchylist.workflows export:weight,isActive, the five permission lists,hideClosedAfterDaysand a state machine'sisActive.routines export:type,isActive,dataTypeand each input'srequired.slas export:reset,repeat, thestartandendlists anddata.baseDate.schedules export:cronTimeZone,timeoutMinutes,priority,owner,execPath,tags,hooks,isSystem,runVersionand the keys ofexponentialBackoff.bots export:extraDataandcommands; in each commandisSlash,isSurvey,showHelp,isActive,surveyIdsandarguments, and in each argumentisOptional.
Two more exports changed shape. users export writes the hierarchy of the profile's company only; it used to fall back to the user's first company. workflows export leaves out a transition's canChange that the YAML cannot express (task-ui, *, several values) instead of turning it into manual or none, so re-applying keeps it; a transition created from such an export starts as manual.
Three exports still send an update when re-applied unchanged: users export leaves out an inactive access role, with a warning, so the re-apply removes it from the user; routines export writes the routine's code as its display when it stores none; and the first re-apply of a survey built in the webclient rewrites it in cotctl's shape — it reads would-update, not no-op, and the dry run's diff does not show why, since it covers the survey's root fields only.
- Who this affects: scripts that read keys from an exported YAML, and anyone keeping exports made with 0.13.0 or earlier — in a repository, for instance.
- What to do: read a missing key as the default the export used to write. Re-export every YAML exported with 0.13.0 or earlier before re-applying it, or it sends as changes the defaults the entity does not store. Re-export it into a scratch folder and merge it into the YAML you keep — or delete from that YAML the keys listed above — rather than overwriting a file that holds edits not yet applied. The costliest case is a schedule stored without
cronTimeZone: the old export wroteAmerica/Santiago, which moves its cron three or four hours away from the scheduler's own zone, and theisActive: trueit wrote relaunches the cron in that zone right away.applynow warns about such a zone.
Schedules: status and cron
The scheduler stops the cron of a running schedule — status running, tick or idle — whenever it updates it. This release makes apply deal with that explicitly:
An update no longer changes a schedule's status.
applyused to leave every schedule it updated inpending, which reactivated a canceled one, and a YAML withoutisActivecounted as active. Now onlyisActive: trueorisActive: falseactivates or deactivates; an omittedisActivedoes neither.With
isActive: true,applyrelaunches the cron right after the update — the same callcotctl schedules activatemakes — and shows it as+ activateafter the code in the dry run, the confirmation prompt and the result line, and asstatusCallunder--json. That suffix replaces the dry run's stderr lineapply will also + activate the schedule.The cron starts again with the new configuration once itstimehas passed.A YAML that omits
isActiveleaves an updated running cron stopped, while the status keeps reading what it read, untilcotctl schedules activate <code>— or until the scheduler service restarts, at a moment nobody picks, such as the next deploy.applyexits0and warns on stderr.A schedule that runs once is never relaunched, since with its
timein the past it would run again right away.applywarns when it updates a finished one, and whencron: ''empties the cron of a running one.A schedule that is
done,errororincompletenow counts as active.isActiveis compared with the status alone, ascotctl schedules exportreads it: active unlesscanceled. SoisActive: falsenow deactivates a finished schedule, moving it tocanceled, andisActive: truealone no longer runs one again.A relaunch that fails after the update exits
3, fromschedules applyandapply --dir: the update is stored, so a re-apply would send nothing and the cron would stay stopped. A status change that fails after the update exits1, since a re-apply sends it again.Who this affects: anyone who applies schedules, and any script that reads their output or retries on a non-zero exit.
What to do:
- Write
isActive: truein the YAML of every schedule whose cron must keep running —cotctl schedules exportwrites it. Write it too to reactivate a canceled schedule, which an update used to do by itself. - Remove
isActive: falsefrom a finished schedule that should keep its status, and runcotctl schedules activate <code>to run a finished one again. - On exit
3, runcotctl schedules activate <code>instead of re-applying. - A script that read
apply will also + activate the schedule.(or+ deactivate) on stderr reads the suffix after the code on stdout instead —Would UPDATE: <code> + activate,Updated: <code> + activate, the[UPDATE]and[updated]lines ofapply -d— or"statusCall"under--json. One that matched a line ending in the code accepts the suffix.
- Write
partial: true and the partial key
partial: true is new in this release (see Added), and it changes how a document that already carries the key is read:
On a PropertyType or a Workflow,
partial: trueis now read. 0.13.0 dropped the key without a warning and applied the document as a complete one: it refused a fragment for the required fields it left out, applied a complete document as a full update, and created the entity when none was stored. Now the document edits only the elements it names, and one whose entity is not stored is refused.Any other value of the key, and the key on any other kind, is refused before anything is sent, by
validate,apply -f,apply -dand every per-kindapply.partialtakes onlytrue, and only on a PropertyType, Bot, Workflow, Routine, SLA or Schedule document. 0.13.0 dropped the key from an AccessRole, Property, User or Survey document without a word.A refused partial document exits with the code its kind gives any refusal:
1for a PropertyType or a Workflow,2for a Bot, a Routine, an SLA or a Schedule, and2for a Workflow that names a deactivated state machine. A refusedpartialkey exits2fromapply -fand from the commands that give a refusal2, but1fromroles apply,properties apply,property-types apply,workflows applyandvalidate;apply -dtreats the file as one it cannot parse, exits1, and goes on with the other files only under--continue-on-error.Who this affects: anyone whose YAML already carries a top-level
partialkey.What to do: remove
partial: truefrom a PropertyType or Workflow YAML that should still be applied whole, or that creates its entity. Remove the key, whatever its value, from AccessRole, Property, User, Survey, JobTitle and Webhook documents, and any value buttruefrom the six kinds that take it.
file:// references
Every kind now reads
file://in its script fields, not only a Survey: thedata.srcof aCCJSorESMCodestage — in a Bot, a Routine, an SLA, a Schedule or a Workflow's bot slots — and a Survey'ssrc,editable.src,hidden.srcand thesrcof anexechook on a question or a table column. A CCJS stage'sdata.src: "file://script.js"used to reach the server as that literal path; it is now sent as the file's content.validate -f,apply -f,apply --dirand every per-kindapplyread them.Only those fields. 0.13.0 read a Survey's references in any
srckey, at any depth. Afile://in any othersrckey now keeps its text, with a warning that-qdoes not silence; one in a key other thansrcwas never read and draws no warning.A reference must stay inside the YAML file's directory.
file://../…, an absolute path elsewhere, and a symlink that leads outside it — a linked file, or a path under a linked directory — are refused with exit1before the document is sent, even when the file exists; the error says where a link leads. A symlink whose target stays inside is still followed. The limit is the directory of each file, not the root of--dir, so a project with one folder per kind and a shared scripts folder beside them runs into it.A reference that cannot be read fails with exit
1— a missing file, a directory, or a named pipe, which used to leave the run waiting forever.validate -fnow reports it, for every document of the file; it used to pass such a reference outside a Survey and let the apply send the literal path. Outside a Survey it fails before anything is sent, unlessapply --dir --continue-on-errorskips the whole file that holds it and applies the others — the run still exits1, or the2or3another document gives. A Survey's fails before that Survey is sent: a multi-documentsurveys apply -fgoes on with the other Surveys, whileapply --dirstops there unless--continue-on-erroris given — with-y, after writing the files before it.In a
partial: truedocument, afile://in thedata.srcof a stage written without itsnameis refused, since the document alone cannot tell the stage's bot type.The file's extension only decides a warning. A file ending in
.js,.mjsor.cjsis read without one; a file with any other extension is read with a warning, which-qsilences in an apply. When the reference is a symlink, the extension that counts is the one of the file it leads to.Who this affects: anyone who keeps scripts in files referenced with
file://.What to do: move each script — or copy its folder — under the directory of the YAML file that references it, instead of linking it, and point the reference at the new path; create the file a reference names, or write its content inline. Write inline the content of a
file://in asrckey that is not a script field. In apartial: truedocument, write the stage'sname(CCJSorESMCode). A pipeline whosevalidate -fpassed a reference thatvalidate --dirrefused now fails at that first step.
Bot stages: required data entries and versions
Every apply,
--dry-runincluded, refuses with exit2a bot stage written without adataentry its bot type requires — in a Bot, a Routine, an SLA, a Schedule and a Workflow's bot slots, with or withoutpartial: true. The required entries come from the live bot catalog for the stage's bot type and version, and the rule is the webclient's: an entry may not be absent,null,""or[], nor may a list hold such an element (user: ["", "u1"]is refused asdata.user[0]). It applies to a new stage, a stage moved to another bot type or version, and an update that drops an entry the stored stage has. A stage written over a stored one that already lacks the entry only draws a warning, so an export re-applies over the stages it came from. A catalog that cannot be read skips the check with one warning.A
PBScriptstage needsdata.data— the routine's input — besidesdata.code, in every version. Every PBScript example cotctl shipped left it out, and the ones that passed an input put it besidedata.code, where it never reached the routine.schedules applychecks each stage'sversionagainst the catalog, as routines, SLAs and bots already did, and refuses with exit2,--dry-runincluded, a version the bot type does not register, or none on a type with no default. It used to apply cleanly and fail when the schedule ran.slas applynow refuses the same case with2instead of1.Who this affects: anyone who applies bot stages — and especially anyone promoting an export from one company to another, as from QA to production: the check compares with the stages stored there, so a stage not stored there yet is new, and every entry it lacks is refused.
What to do: give each entry the refusal names (
data.<key>) a value; a stage that moves to another version needs every entry that version requires. Put a routine's input underdata.data, and writedata: {}when the routine takes none. Re-export routines exported with an earlier version: those exports lost every empty object, so theirPBScriptstage is refused where the stored one holdsdata.data: {}. For versions, write one thatcotctl bot-types versions <BotType>lists, or leave it out on a type with a default.
New refusals before anything is written
Each of these used to pass validate and the dry run and then fail in the middle of the apply, or be stored in a way nobody intended. They are now refused up front.
Workflows
asset.propertytakes one Property code, and agenericasset must have it. A generic asset with noasset.propertyor withproperty: []—asset.property must name one Property on a generic asset: the server refuses to save the asset without it— and any asset with a list of two or more are refused with exit1,--dry-runincluded, on an update too. They used to fail at the state machine's write, with a server error. Auniqueasset may still leave the key out. What to do: declareasset.propertyon every generic asset, with the one code the asset is —cotctl workflows exportwrites it.- A key the Workflow root does not declare is refused with exit
1. A key written one level too high —cardLabelsat the root instead of under a state machine — used to be dropped without a word; the message says where a state machine field goes (stateMachines[].cardLabels), and answers acodeor anamewith the root'snameCodeornameDisplay. What to do: move the key under the state machine it belongs to, or remove it. - A Survey the server does not have is refused before the first write, with exit
1,--dry-runincluded: a transition'srequiredSurvey, a StartForm'srequiredSurvey.surveyCodeand a state'ssurveyTriggers[].survey. The apply used to stop halfway, after creating the Group, the TaskGroup, the state machine and its states, and exit3. A Survey that the sameapply --dirapplies earlier counts as present. What to do: apply the Survey first, or add it to the directory. A cleanup step that waited for exit3in this case now gets1, with nothing left to clean. - A state machine whose
codea deactivated state machine holds is refused with exit2, before anything is written,--dry-runincluded. The dry run used to plan a create, and the apply wrote the Group and the TaskGroup before the server refused it. Nothing in the API updates or reactivates a deactivated state machine. What to do: remove it from the YAML, declare it withisActive: falseto leave it as stored, or give it another code.
Surveys
dateModetakes onlydateordate_time, on adatetimequestion and on adatetimecolumn of a+table:validateexits1and an apply2. Any other value —timeanddatetimeincluded, or an emptydateMode:— used to be saved as a date only, without the time of day and without a word. There is no time-only mode. What to do: writedateMode: date_timewhere the question should capture the time of day, anddate, or nothing, where it should not. A+tablecolumn already saved as a date stays one — on a column,date_timeis a type change the apply refuses — so capture the time in a new column.- A
tablequestion whosemaxis below 1 is refused, withmax must be at least 1 row — remove it to keep the 50-row cap(validateexits1, an apply2), even when an unedited export of such a table is re-applied. What to do: remove themax. Such a table only half works today — the webclient refuses to submit it — and withoutmaxit takes up to 50 rows; set amaxof 1 or more only to actually limit the rows. - A YAML that would write one stored chat twice is refused with exit
2,--dry-runincluded. The server keeps the last write, so one of the questions used to leave the survey without a word. Two kinds of YAML do it: one that gives a new question the identifier of a stored title while keeping that title's question, and one that declares apart two questions the survey stores in one chat. What to do: give the new question another identifier, and declare two questions that share a chat with thechatformat, which keeps them together. - A question identifier — or the title name cotctl gives a question,
<id>_labelor<id>_label_<n>— that another question of the company already holds exits2withIdentifier "<id>" cannot be reused, instead of1and the server's raw500. That includes a question a survey stopped declaring, which the server keeps. What to do: declare the question with another identifier; neither cotctl nor the public API can delete a stored question. surveys export --formattakes onlysimplifiedorraw, in lower case. Any other value —xml,json,RAW— exported the simplified format and exited0; it now exits1. What to do: pass one of the two, or leave the flag out for the default.
Other kinds
- A PropertyType schema node's
editableblock is refused with exit1. The platform has noeditableon a schema node and dropped it,file://included, without a word. What to do: remove the block; to keep users from editing the field, useisNonEditable: true. - A
name(AccessRole, Bot), acode(PropertyType) or astateMachine(SLA) made only of whitespace is refused like an empty one — exit1for an AccessRole or a PropertyType,2for a Bot or an SLA. An AccessRole or a Bot used to be written named with spaces. What to do: give the field a value. - Reading a Routine found by its
codeneeds theadmin-pbscripts-readpermission —routines get,routines export,routines test, and an apply of a Routine document withoutidwhose routine exists — because cotctl now reads it the way the webclient does. A profile without it getsAPI Error 403and exit1. What to do: grant the profile's useradmin-pbscripts-read, the permissionroutines listalready needs. - A batch that declares the same entity twice fails before that entity is written, where the last document used to win: two documents of one kind with the same
code,name,emailornameCode— an SLA'scodewithin its state machine — in one file, or anywhere in the directory underapply -d. Everyapplyexits2; withapply -d --continue-on-error, the files that do not repeat it still apply, and each document skipped with the refused file is named. What to do: keep one document per entity — the last one, which used to win. apply --dir --dry-runrefuses a User, a JobTitle or a Survey'spermissionsthat names an AccessRole by a name the directory renames away, or a role the directory leaves inactive, with exit2, as the apply already did. What to do: write the role's new name, and remove a role the directory leaves inactive, or activate it.
Exit codes
What each code means as of this release — the cases in the table below now line up with it:
0— success.1— the default failure: a runtime failure (the network, the server, a catalog that cannot be read), a file orfile://reference that cannot be read, everyvalidatefailure, and what an AccessRole, PropertyType, Property or Workflow refuses.2— a YAML refused before its document was sent (other documents of the same run may have been sent) for a Survey, User, JobTitle, Bot, Routine, SLA, Schedule or Webhook, plus three refusals that exit2whatever the kind: an entity declared twice, a bot stage missing a requireddataentry, and a state machinecodethat a deactivated one holds. Apart from that,2also means adangerfinding under--dry-run --fail-on-destructive, and a survey thatsurveys exportcannot model.3— an apply that stopped partway and left something needing attention — resources a Workflow created, or a schedule whose cron relaunch failed — which wins over any other code.
These cases change:
| Command | Case | Was | Now |
|---|---|---|---|
Every apply, roles, properties and property-types apply included | A batch declares the same entity twice | 0, the last document won | 2 |
surveys apply, apply -f | A survey YAML they refuse: a schema or semantic error, an identifier another survey holds, a question type change, a reference that does not resolve, a renamed code, an unknown AccessRole or permissionsV2 code, a table edit its locks refuse | 1 | 2 |
surveys apply, apply -f, apply --dir | A question identifier or title name another question holds | 1, the server's raw 500 | 2, Identifier "<id>" cannot be reused |
slas apply, schedules apply, apply --dir | A YAML they refuse: the schema, a cron that does not parse, a PBScript stage naming a routine the company lacks, an SLA stateMachine missing — or ambiguous without --task-group — or start / end states it does not have, an unregistered bot version | 1 (0 for a schedule stage's unregistered version, which was not checked) | 2 |
apply --dir | A document its own command refuses with 2 | 1 | 2, also after --continue-on-error |
apply --dir --dry-run | A User, JobTitle or Survey naming an AccessRole the directory renames away or leaves inactive | 0, or 1 | 2 |
bots apply, routines apply, users apply, jobtitles apply, apply -f with a User or JobTitle | A runtime failure: a PBScript catalog that cannot be read, a User or JobTitle lookup that fails | 2 | 1 |
bots apply --dry-run | An HTTP or network failure while previewing a bot | 2 | 1 |
apply -f, workflows apply -f | A workflow apply that stopped partway, under --rollback too | 1 (from workflows apply -f, only when a failed request stopped it) | 3 |
workflows apply, apply -f, apply --dir | A Survey the server does not have | 0 from a dry run; 3 (1 from apply -f) after writing part of the workflow | 1, nothing written |
workflows apply, apply -f, apply --dir | A state machine code that a deactivated one holds | 0 from a dry run; 1 or 3 after writing the Group and TaskGroup | 2, nothing written |
schedules apply, apply --dir | The cron relaunch fails after the update | — | 3 |
users apply, jobtitles apply, apply -f, apply --dir | An inactive User or JobTitle whose YAML omits isActive | Refused: 2 from users apply and jobtitles apply, non-zero from apply | 0, applied, stays inactive |
jobtitles apply | A system JobTitle's code typed back wrong at its prompt | 2 | 0, Apply cancelled. |
surveys export | A --format other than simplified or raw | 0 | 1 |
surveys apply --dry-run --fail-on-destructive | The update would deactivate questions | 0 | 2 |
workflows apply / surveys apply --dry-run --fail-on-destructive with a legacy-replace flag | The write empties a permission list | 0 | 2 |
apply --dir without -y | Its preview finds an error, without --continue-on-error | Asked; a yes wrote the files before the error | The error's code, nothing asked or written |
slas apply and schedules apply still exit 1 for a request that fails while the SLA is looked up, a routine catalog that cannot be read, and a script stage without --allow-script-bots.
- Who this affects: any script or pipeline that branches on
$?. - What to do: re-check each row your scripts rely on. Even a pipeline that only tests for a non-zero exit is affected by the rows whose old or new code is
0: it now fails, or passes, where it did not.
Output that scripts read
An entity your YAML does not change is reported as unchanged, never as updated. The result line reads
Unchangedfrom most per-kindapplycommands,<kind> "<identifier>" unchanged — nothing to sendfromapply -fandsurveys apply, and[unchanged]fromapply -d; a dry run printsNo changes([NO-OP]underapply -d) instead ofWould UPDATE. Each summary gains anunchangedcount afterupdated, andupdatedcounts only what was sent. Under--jsonthe action isno-opin a dry run andunchangedin an apply.What
--rollbackdeactivated reads as rolled back, not as created:<kind> "<identifier>" rolled back — created, then deactivatedfromapply -f;[rolled-back]and anN rolled backcount fromapply --dir;Rolled back <kind>: <identifier>fromworkflows apply, which now prints result lines after a partial apply;"action": "rolled-back"under--json.Under
--json, stdout carries only JSON. The confirmation prompt andApply cancelled.ofsurveys apply,workflows applyandproperties applyprint on stderr.A repeated entity skipped under
apply -d --continue-on-errorreads as a[skip]line, askippedcount in the summary, and"action": "skipped"under--json.A runtime failure in a User's or a JobTitle's pre-apply checks reads
Pre-apply checks could not run for …instead ofPre-apply validation failed for …, and a failed User lookup readsCould not look up the user by id "…".A multi-document
surveys apply -fgoes on after a survey that fails — its read, its write, or afile://it cannot read — where it used to stop the file there. The failed survey printsError: <code>: …(a"would-error"line under--json), and the exit code does not change.surveys applyhas no--continue-on-errorto choose the old behaviour.Who this affects: scripts that parse result lines, summaries or the
actionfield.What to do: accept the new values, and add the
unchangedcount toupdatedwhen you compare it with the number of documents. To stop at the first survey that fails, apply each survey from its own file, one call per file, and stop at the first non-zero exit.
Dry-run gates and interactive runs
surveys apply --dry-run --fail-on-destructiveexits2when the update would deactivate questions. A stored question the YAML leaves out is deactivated, and the dry run now reports it as adangerfinding —⚠ DANGER, and"ruleId": "survey.questions-deactivated"under--json. 0.13.0 did not report it, so the gate passed. The gate is all or nothing: a question you remove on purpose fails it too. An unmodified export made with 0.13.0 or earlier can fail it as well, because that export misread a title namedlabelQuestion<identifier>as a question of its own and left the real one out (see Fixed).Under
--legacy-replace-workflowsandsurveys apply --legacy-replace, the dry run shows the write those flags make, so--fail-on-destructivenow exits2where that write empties a permission list (workflow.permissions-wipe,state-machine.requiredSurvey.permissions-wipe,survey.permissions-wipe). The dry run used to compare the YAML with the stored values and report those fields as preserved.apply -fandapply --dirshow the same findings and still exit0: they have no--fail-on-destructive.Without
-y,apply --dirpreviews the whole directory before it asks (see Fixed), and a preview that finds an error ends the run with that error's code —2for a refused YAML,1otherwise — without asking or writing anything, unless--continue-on-erroris given. In 0.13.0 a yes applied the files before the error. A declined prompt that shows errors exits with their code, where it exited0.Who this affects: pipelines gated on a dry run, and scripts that answer the
apply --dirprompt.What to do: in a gated pipeline, declare a question to keep it; to remove it on purpose, check the question the gate names and apply without the gate — a real apply ignores the flag. Re-export surveys exported with 0.13.0 or earlier before gating them. Under the legacy flags, declare the permission list to keep it, or drop the flag, whose absence merges what the YAML omits. To apply what a broken directory still holds, pass
--continue-on-error; to skip the preview,-y.
Added
Version updates: cotctl tells you when a newer version is out, and installs the ones without breaking changes. Before every command but
cotctl update, it reads the latest published version of@cotctl/clifrom npm.- In a terminal, an update without breaking changes — a patch, such as
0.14.0to0.14.1— is installed before the command, which then runs on the new version and returns its own exit code. One with breaking changes — before 1.0, a minor version bump, such as0.14.xto0.15.0— is offered on every command with three options,update,continueandcancel, next to the link to its release notes;cancelexits0without running the command, and choosingupdateexits1without running it when this copy cannot update itself, another cotctl process is installing an update, or npm fails. - Without a terminal, or with
-y/--yes, it never asks and never installs: it writes a notice to stderr and runs the command, without touching stdout. A terminal means that stdin, stdout and stderr are all attached to one and theCIenvironment variable is not set, so a CI job, a pipe or redirected output count as unattended — but a script started from a terminal does not. SetCOTCTL_NO_UPDATE_CHECK=1in such a script, or pass-y, so it neither installs a patch partway through nor stops at the prompt. - The check waits at most a second and a half, is ignored silently when it fails, and its result is kept for 12 hours next to the profiles.
COTCTL_NO_UPDATE_CHECK=1turns it off. - Only an installation made with
npm install -gon macOS or Linux, with write permission on npm's global directory, updates itself. A standalone binary, an installation inside a project or throughnpx, Windows, and an installation made withsudoare shown the command to run by hand instead. A standalone binary is also told to delete that file or replace it with the new version's: if it comes first in yourPATH, it keeps running the old version. - If an automatic install fails, cotctl says so, carries on with the current version, and does not retry that version for 12 hours. A whole installation is cut off at five minutes.
cotctl updateupdates to the latest version on demand, also without a terminal. It exits0when it updated or was already up to date, and1when it could not reach npm, this copy cannot update itself, another cotctl process is installing an update, or npm failed.0.13.x and earlier do not carry the check, so the move to 0.14.0 is manual:
npm install -g @cotctl/cli@0.14.0, or replace the standalone binary with the 0.14.0 one. From then on the notices come by themselves.In CI, cotctl never updates itself: a pipeline keeps running whatever version its install step fetched, and gets a notice on stderr on every command while a newer one exists. Install a pinned version (
npm install -g @cotctl/cli@0.14.0) rather than the latest — an unpinned install picks up the next minor release, breaking changes included, on its next run — and move the pin on purpose, after reading that release's breaking changes. SetCOTCTL_NO_UPDATE_CHECK=1in the job to skip the lookup before every command.- In a terminal, an update without breaking changes — a patch, such as
partial: trueedits one element of a keyed list without rewriting the others. A PropertyType, Bot, Workflow, Routine, SLA or Schedule document that carries it names only the elements it changes. To edit one node of a property type with fifteen, write the type and that node — itskeyand the change — and the other fourteen stay as stored:kind: PropertyType
code: office_location
partial: true
schemaNodes:
- key: address
display: Street address- What it reaches: a property type's
schemaNodes(bykey); a bot'scommands(byslashCmdorsurveyIds) and theirarguments(byname); a workflow's states (byproperty) with theirnext(bytarget) andsurveyTriggers(bysurvey); and the stages (bykey) of a bot'sparametrizedBot, a routine'sbody, an SLA'spb, a schedule'sbodyand the bot in each of a workflow's bot slots. It works inapply -d,apply -f(a PropertyType or a Workflow),property-types apply,bots apply,routines apply,slas apply,schedules applyandworkflows apply. - How it merges: a named element is completed from its stored pair, so it may leave out what the schema otherwise requires — a node's
basicType, a stage'sname, a state machine'sname,propertyTypeandasset, a schedule'stimeandbody. The merged document is then validated whole: an issue in what the document writes refuses it, naming the element (schemaNodes[key="serial"].basicType: …), and an issue the stored entity already has elsewhere is a warning. Inside a named stage,dataandnextmerge key by key: write one key to change it,nullto remove it, or{}to empty the whole field —next: { ERROR: notify }reroutes one branch and keeps the others. A schedule removes no key, since its scheduler keeps them: there, anullor{}over a stored value is refused, and a branch is emptied by writing it as"". - What it never does: delete, reorder or create. A stored element the document leaves out keeps its place; a new one is added last with a warning — and so is an element whose key was edited, such as a survey command's
surveyIds; a document whose entity is not stored is refused. A bot'scommands: []deletes nothing under the marker. The one exception is a workflow bot slot written asbots: [], which is emptied as without the marker, deleting the bot stored there with its stages; the dry run and the apply warn of it, and-qdoes not silence that warning. A stage the merge leaves unreachable is warned of; applying the full document, without the marker and without that stage, is what deletes it. - It never guesses: an element whose key the stored list repeats, or that the document names twice, is refused before anything is sent, naming the key — and so is a declared bot in a workflow slot that stores several bots.
- What it reports: the dry run lists the stored elements the document keeps (
Kept 14 schemaNodes the partial YAML does not name (partial: true deletes nothing)), the apply names them on its result line, and--jsoncarries them aspreservedElementswithreason: "partial".validate -fandvalidate -dcheck a partial PropertyType or Workflow on its own, with its required fields optional; a partial Bot, Routine, SLA or Schedule is checked byapply --dry-run. - Not covered: a routine's
dataType(a partial routine that declares it is refused), a survey's questions, lists of values such as permission codes, and every other kind.--legacy-replace-workflowsrefuses the marker, and editing a storedPBScriptstage still needs--allow-script-bots.
- What it reaches: a property type's
applywarns on stderr before an update that takes something away or stops something — with--dry-run, in an interactive apply and with-yalike.-qdoes not silence these warnings, and none of them changes an exit code:- a User losing access roles — which takes the user out of the task groups those roles grant;
- a TaskGroup losing permission codes, list by list (a dry run reports them as findings instead: a list emptied whole as
DANGER, any other loss aswarn, carried indestructiveChangesbyworkflows apply --dry-run --json); - a running cron that a YAML omitting
isActiveupdates, or thatcron: ''empties; - a property type's view permissions emptied by
hidden: true; - a Bot losing commands, each named by
slashCmdorsurveyIds, where a dry run used to show only the count; - a workflow bot slot stored with several bots, all of which the declared bot replaces;
- a schedule stage or a routine input written over another stored one, naming the keys it keeps from it;
- a cron moved to a time zone the schedule does not store — for
America/Santiago, the zone an old export wrote, the warning also says to re-export.
More dry runs print a per-field diff.
apply -f --dry-runandapply --dir --dry-runprint, under each PropertyType, Property, Workflow (with its state machines and states) or Survey, the diff the per-kind commands print. The new--diff <mode>sets how much —off,compact(the default) orverbose—-qdrops it, andapply --dir --jsoncarries the whole diff.property-types apply --dry-runshows what an update changes, one line per schema-node field, where it printed onlyWould UPDATE.schedules apply --jsonandapply --dir --jsonprint one JSON object per line on stdout, in the shape ofsurveys apply --json:statusCall(activateordeactivate) when a schedule update is followed by that call,fileunderapply --dir, and a failed document as"action": "would-error"with itserror. The prompts print on stderr.apply -frefuses--json.conditionalDisplaytakesresetIdentifierson its own, on a question no other question commands: the webclient clears those answers whenever this question's answer changes, which is what empties the answers nested under a main option.dependsOnandshowWhengo together or not at all, andresetOnHideis refused without them.surveys exportnow writes such a reset in this form, where it used to drop it — and earlier versions refuse a YAML that uses it, so a team that shares exports should move to 0.14.0 together.New warnings for configuration that applies and then does not work:
- a
+surveyquestion embedding an inactive survey — the backend fails to load a public survey that embeds one; - the survey keys the server does not store —
onlyChannelCreation,responders,representation,boundsandreassignable: a create gets their defaults whatever the YAML says, and an update that is sent erases a value another client stored — the warning before such an erase survives-q; conditionalDisplay.resetOnHide: true, which the server does not store, so it clears no answer —resetIdentifiersis what does;- a StartForm's or a transition's permission code that no active AccessRole grants — a typo, an AccessRole id where a code belongs, or a code only an inactive role grants. No user holds it, and a list made only of such codes keeps the StartForm or the transition from everyone;
- a
bots exportwhose YAML cannot be re-applied as it is, because a survey command is stored withoutsurveyIds; - a card-label slot that
isActivelists but that holds no PropertyType, fromworkflows export; - a Workflow bot stage that lacks a required
dataentry, fromvalidate -f --remote.
And
validate --dirlooks for each Survey a Workflow names among the directory's Surveys, reporting one it does not declare as a warning, since it may already exist on the server.- a
Changed
- Large companies see fewer server reads.
apply --dir,surveys apply -fand the Workflow apply look each survey code up once per pass or per file, read a Workflow's state Properties in one batched request, and read the bot-version catalog once per pass instead of once per document. The writes and the exit codes do not change.
Fixed
- Re-applying what you already applied changes nothing.
applysends only the keys whose value differs from what the server holds, and no request at all when none does. A re-apply used to write every entity again, and the write was not harmless: task groups, state machines, states, SLAs and bots were saved again, a property type pushed its schema nodes to its task groups again, a survey deactivated and reactivated all its chats, and a schedule update stopped an active cron. A survey is saved whole, so it is sent in full or not at all. A value stored in another shape — a list in another order, another type — is still sent: the cost is one extra request, never a lost change.- The dry run announces what the apply does. An existing entity is no longer always
would-update, and changes the apply never sends are gone: a Bot'sextraDataand a Routine'sdescription,dynamicPropertyTypes,nameTranslationsandrequiredSurvey.autoCreateTaskon workflows, a Property'sschemaInstancereference, a Survey'spermissionsunder--skip-remote-validation, and StartForm and transitionpermissionsshown as AccessRole ids. - A schedule's
timeandendDateare compared as the instant the scheduler stores, and a date-time without a zone designator means UTC, whatever the zone of the machine running cotctl —applywarns about one, so write it withZor an offset. The scheduler ignoresownerandrunVersionon an update, so they no longer count as changes, andapplywarns when they differ from the stored values. - A Routine is read the way the webclient reads it, so an empty object such as a
PBScriptstage'sdata: {}survives: a routine written that way converges instead of reporting the same change after every apply, androutines exportkeeps it.routines testno longer sends aversion: nullfor the bot and its stages, which a company withenableSecurityrefused, androutines get --jsonprints the routine asroutines list --jsondoes. - A workflow bot stored without a pinned version is no longer sent back as
version: null, which the server's own validator rejected: a StartForm, subtask, transition or survey trigger that omittedbotscould fail the update of its state machine or state.
- Exports that now apply again.
workflows exportno longer fails on a state machine with agenericasset (asset.property.map is not a function); the Property code it writes resolves back on apply, and anasset.propertywith one code now applies.workflows exportleaves out a slot'sbotswhen the slot stores more than one bot, with a warning, and a state's sub-workflowsubtask.target—applyrefused both — and the update keeps the stored values.slas exportwritesstart.statesandend.statesby Property code, so re-applying no longer fails withstate id … does not belong to the target StateMachine.surveys exportkeepsisBulkForm— re-applying a bulk form's export used to turn it off and take the form out of the Actions menu of a workflow's task view — and theonPlaybutton of a question with noonPlayscript, which re-applying deleted.surveys exportfolds a title namedlabelQuestion<identifier>, as solution presets name them, into its question. It used to export the title as atextquestion and drop the question it titles, so applying the export deactivated that question. An export made with 0.13.0 or earlier still lacks the question: export the survey again before applying it — with-y, the apply deactivates it without asking.surveys exportno longer writesresetIdentifiers: [""], nor an identifier that names no question of the export — it warns instead — both of which madevalidateand every apply refuse the file it had just written.- In a survey built in the webclient, a question's title (
<question>_<digits>) is no longer counted as a question the update deactivates, and the apply writes it back under its stored identifier and_idinstead of replacing it with a new title. A real question whose identifier ends in_labelis now named when an update deactivates it.
- Surveys.
- A conditional question that depends on another conditional question keeps reacting to it, whatever their order in
questions. - A survey YAML that omits
questionsis no longer refused when the survey has a table. validate -f --remoteaccepts a child survey declared earlier in the same file, assurveys apply -fdoes.- A question the survey removed and the YAML declares again is refused with
Identifier "<id>" belongs to a question removed from this survey, instead of a claim that another survey holds it. - An apply about to erase a
resetIdentifiersstored on a question says so before writing, even under-q.surveys apply --dry-run --legacy-replacewarns when a declarededitablewithoutsrcwould delete the stored script. - New warnings, which
-qsilences: adisplayon a simplified question or+tablecolumn, which was never sent — on atextquestion the visible text is itslabel, rendered as Markdown; adateModeon a type other thandatetime; and aresetIdentifierswith no condition on atextquestion. surveys list --alllists the inactive surveys too.
- A conditional question that depends on another conditional question keeps reacting to it, whatever their order in
- Dry runs refuse what the apply refuses.
- A PropertyType dry run runs the schema-node immutability check and resolves a pinned
idas the apply does, so a changedbasicType, or anidthe company does not have, fails the preview too. A node that omitssubTypekeeps the stored one instead of failing withsubType is immutable, and each node is compared with the stored node it actually replaces. apply -f --dry-runandapply -d --dry-runprint the destructive findings they computed and never showed — a permission wipe, a deactivation, the questions an update deactivates — and an apply of a Survey, a Property or a Workflow prints the same findings on stderr before writing, with the dry run's severity;-qkeeps them.--dry-runand-ynow name the questions a survey update deactivates, in thequestions[]and thechat[]formats.apply --dir --dry-runreads a reference to what the same directory creates as the apply will find it: an SLA naming a Workflow's state machine or states; a JobTitle naming a Property, a PropertyType or an AccessRole; a Survey'spermissions,permissionsV2,+personJobTitle,propertiesChannelorpropertiesLimit; a User's access role, job title orhierarchy; a Property'sCOTPropertyreference; a Routine'sPBScriptstage; and an AccessRole the directory renames or reactivates through itsid. A reference to something only a later file creates is still an error, as in the apply.- A Workflow dry run shows its TaskGroup's fields — the permission lists,
hideClosedAfterDays,availableViews,defaultView,defaultSelectedTaskTab— a StartForm moved to another Survey, a state machine'sasset, and theinitialStateMachinethe apply sets. - A workflow update may leave out the
versionof a bot type with no default when the stored stage pins one; it used to be refused withversion must be specified.
- A PropertyType dry run runs the schema-node immutability check and resolves a pinned
- Prompts show the warnings while you can still decline.
- Without
-y,apply --dirruns the directory as--dry-rundoes, with the same flags, and prints that preview before it asks. The prompt totals it —3 CREATE · 12 UPDATE · 40 NO-OP · 1 ERROR — Apply 15 changes to dev?— and is skipped when there is nothing to send; a file it cannot read is anERRORrow, as with-y. Each stored entity is read twice: once to preview, once to write. bots apply,property-types applyandapply -fwith property types print their warnings before the prompt, and list each entity asCREATE,UPDATE,NO-OPorERROR. The User, JobTitle, SLA, Schedule, Webhook and Routine prompts label an unchanged entityNO-OP, and an interactiveworkflows applyruns its own dry run before asking.users applywarns about a user it creates with no password and no--notify-emailbefore you confirm.property-types applyandapply -fstop before the prompt, having written nothing, when planning a document fails, and report the documents they handled when another one fails.- A Ctrl-C at a prompt, or a system JobTitle's code typed back wrong, stops
apply --dir—--continue-on-errorincluded — and every per-kindapply: what was already applied is reported, and the run readsApply cancelled at a prompt: nothing after it was applied. - The password prompt of an automatic re-login prints on stderr, so it no longer lands among
--jsonlines.routines applyprints each warning once.
- Without
- Workflows, property types and SLAs.
workflows applypatches only the level the YAML touches, the Group or the TaskGroup, and a YAML whose only root field isdefaultSelectedTaskTabnow applies it.- A transition that omits
canChangekeeps its stored value instead of becomingmanual. - A property type update sends its schema nodes in their stored order, the omitted ones in place and the new ones last; a YAML listing them in another order produced an update the server rejected as forbidden.
- A JobTitle update that omits
accessRolesno longer asks for the typed confirmation on theadminandbotjob titles, and a User'sdisplayNameuses the stored last name when the YAML omitsname.lastName. - The Workflow apply's warning about a routine's required
dataTypeinputs reads them fromdata.data, and says when one is written besidedata.code, where it never reaches the routine. - An SLA resolves a state whose Property a batched read left out, instead of refusing it as not found.
- A workflow apply that a failed request stopped prints the result lines of what it wrote, and still exits
3.
- Messages, help and
--json.properties list --json,property-types list --json,roles list --json,surveys list --jsonandworkflows list --jsonprint[]when nothing matches, instead of a line of text.workflows apply -qdrops the advisory warnings, as its help promises, andsurveys apply,workflows applyandproperties applyno longer print--quiet ignored with --json.- An update the server refuses for changing a read-only field, such as a
code, names the field in every environment —Attempted to modify a read-only field (path: /code), orAPI Error 403with aDebug:line — and keys such aspasswordortokenin thatDebug:part read[REDACTED]. - The hint for a refused
codechange names the entity refused. For a JobTitle it gives the steps: deactivate the stored one withcotctl jobtitles deactivate <code>, apply the YAML withoutidto create the newcode, and move the users to it. - A server
500on a User names the write it answered:Update rejected by server (HTTP 500)orHierarchy PATCH rejected by server (HTTP 500). - A Bot or a Routine with an empty
nameorcodeis named by its position (document <n>: name: name is required), and messages joined with;no longer carry a stray period. surveys export -o jsonand-o yamlno longer suggest a--format jsonor--format yamlthat does not exist.schedules activateandschedules deactivatedescribe what they do:activatesets a schedule in any status back topending, anddeactivatecancels one in any status. When the user cannot create an ApiToken,cotctl loginpoints at--paste-token, or--tokenfor a non-interactive run.
Docs
- The skills embedded in the CLI describe 0.14.0: the
file://rules, the version notice,partial: true, what an update sends and what it keeps, the--jsonfieldspreservedElements,diffanddestructiveChanges, andcotctl bot-types listfor the bot type catalog. The@cotctl/cliREADME describespartial: true. - Earlier guidance was corrected on these points — worth checking if you configured from it:
- A StartForm's or a transition's
permissionstake permission codes, not AccessRole ids. A list of ids matches no user and keeps the transition from everyone: replace each id with the permission code it was meant to require.applynow warns of a code no active AccessRole grants. - A
PBScriptstage passes onlydata.datato its routine (see Bot stages above). resetOnHide: truehas no effect;resetIdentifiersis what clears answers. And cotctl cannot set a survey'sonlyChannelCreation,responders,representation,boundsorreassignable.- To soft-delete a routine, export it, set
isActive: falseand apply it back. A stub with a placeholder stage replaces the routine's real stages. apply --dirapplies files and documents in order: a child Survey, and the Routine aPBScriptstage calls, must come in an earlier document or file; the Property aCOTPropertynames, in an earlier file; a User ahierarchynames, in the same file or an earlier one.apply -frefuses--continue-on-errorwith exit1; it was described as ignored.bots applyasks you to type the bot name beforecommands: []deletes every command,-yincluded, whileapply --dirnames the commands in its preview instead.apply(-for--dir) has no--fail-on-destructive, and adangerfinding is not always asked about:-yskips the question andapply --dirnever asks it.schedules activateleaves the cronpendinguntil itstimehas passed.
- A StartForm's or a transition's
Migration
- Install 0.14.0 by hand once —
npm install -g @cotctl/cli@0.14.0, or replace the standalone binary. It is the first version that announces the next ones. In CI, pin the version and setCOTCTL_NO_UPDATE_CHECK=1; in a script started from a terminal, set it too or pass-y. - Re-export every YAML exported with 0.13.0 or earlier before re-applying it — schedules (their time zone), surveys (
labelQuestiontitles) and routines (empty objects) above all. Export into a scratch folder and merge into the YAML you keep, rather than overwriting edits not yet applied. - With 0.14.0 installed, run
apply --dir --dry-run(or each kind'sapply --dry-run) over your YAML before you move a pipeline to it, and fix what it refuses, such as a bot stage missing a requireddataentry (data.dataonPBScript), agenericasset withoutasset.property, a Workflow naming a Survey the server lacks, adateModeother thandateordate_time, a tablemaxbelow 1, afile://outside the YAML file's directory, an entity declared twice, apartialkey. - Write what an update must reset —
[],"",isActive: true,version: null,bots: [],viewPermissions: []— and leave out a bot'sextraData, a state'snextand a user'shierarchyto keep them. - Write
isActive: trueon every schedule whose cron must keep running, and removeisActive: falsefrom the YAML of a finished schedule that should keep its status: the apply now deactivates it. - Move
file://scripts under the directory of the YAML file that references them. - Re-check every branch on
$?against the table in Exit codes, and every parser of result lines or--jsonagainst Output that scripts read. - Re-check pipelines gated on
--dry-run --fail-on-destructive: a survey YAML that leaves out a stored question, and a legacy-replace write that empties a permission list, now exit2. - Move the team, and every pinned CI install, to 0.14.0 together when you share survey exports: earlier versions refuse the
conditionalDisplaywithresetIdentifiersalone that 0.14.0 exports write. - Remove
partial: truefrom PropertyType and Workflow YAML meant to be applied whole, and anypartialkey from the kinds that do not take it. - Grant
admin-pbscripts-readto the profiles that read or apply routines bycode. - Replace AccessRole ids in StartForm and transition
permissionswith the permission codes they were meant to require.
0.13.0 — 2026-10-02
A reliability release for survey validation. The headline is that a survey embedding another survey is no longer rejected because of how the embedded survey is named — the most visible of several checks that failed on YAML that was valid, or broke outright instead of reporting an error. One gap closed in the other direction: two fields that have to be lists are now checked as lists instead of being misread.
⚠ Breaking changes
A filters written as a map, and a jobTitle jobs written as a single value, now fail validation.
On a +property question filters has to be a list, and on a +person question with allow: jobTitle so does personFilter.jobs. A filter missing its leading - , or jobs: mgr instead of jobs: [mgr], used to pass the semantic check — validate exited 0, and so did surveys apply --dry-run --skip-remote-validation. The apply that followed then failed without naming the problem, or looked up one JobTitle per letter of the value. Both now report filters must be a list or jobs must be a list, name the question, and exit 1. Under any other allow, jobs is still not read and still not checked.
- Who this affects: anyone whose survey YAMLs write a
+propertyfilter without its leading-, or a single-valuejobsunderallow: jobTitle— and any survey that0.12.0already applied from one of those files. - What to do: start each filter with
-, and writejobsas a list. Then check the surveys0.12.0applied with a validation flag off: under--skip-remote-validationit wrote a single-valuejobsto the survey as a string, and under--skip-semantic-validationit wrote a missing one as an empty list. Those surveys export without their JobTitle codes, and re-applying that export fails withjobs must not be empty when allow is "jobTitle"— add the codes back as a list before you re-apply. - If you branch on exit codes: with
--skip-semantic-validationthe apply now refuses both before writing anything, and exits2—1underapply --dir.
Fixed
A survey that embeds another survey is no longer reported as missing because of how it is named.
surveys apply,apply(-for--dir,--dry-runincluded) andvalidate --remoteresolved each+surveyquestion'ssurveyCodewith a search the backend matches against the survey's name, not its code. A sub-survey named "Agregar Producto" with codeso_add_productcame back asSurvey with code "so_add_product" not foundand the command exited1— on valid YAML, an unchangedsurveys exportincluded. The only way past it was--skip-remote-validation, which switches off the survey's other remote checks along with it. The check now resolves codes the same wayapplydoes when it writes the reference, so the two agree on what exists: a code that no survey carries is still reported, with the same message, and a reference to an inactive survey passes.A
+surveyquestion whosesurveyCodeis missing, empty or not a string gets an error instead of breaking the command. AsurveyCodesuch as123or a list stoppedvalidateandapplyoutright; an empty one, or one carrying an accent or a slash, failed the apply with an HTTP 400 from the backend. They now get the usualsurvey requires a non-empty surveyCodeorSurvey with code "…" not foundand exit1.A survey that references more than ten PropertyTypes, JobTitles or Properties no longer fails on all but ten of them. Each kind of reference was looked up in a single request, which the backend answers with at most ten results. With eleven or more distinct codes of one kind — in
+propertyquestions, in the JobTitles of its+personquestions, or inpropertiesChannel/propertiesLimit— the rest came back as… not foundand the command exited1on valid YAML. Which codes failed depended on the backend's ordering rather than on your file, so the same reference could pass in one survey and fail in another. Each lookup now asks for every code it sends.A
+propertyquestion withoutfilters, or a+personquestion withoutpersonFilter, is reported instead of breaking the command. The apply stopped on an internal error that hidproperty requires at least 1 filterorperson requires personFilteralong with every other error it had already found. Those are now reported together, and the command exits1as it does for any other invalid survey.validate --remote --skip-semantic-validationbroke the same way; it now completes its remote checks.properties apply,workflows applyandjobtitles applyno longer fail with HTTP 431 when their YAML carries many long codes. They looked codes up in requests of up to 100 whatever their length, so enough long PropertyType or Property codes made a request larger than the backend accepts. They now split them the way the survey checks do.The help of
--skip-remote-validationand ofvalidate --remotenames what each one covers.--skip-remote-validationsaid "Skip remote identifier validation", but it skips the survey's remote checks of identifiers, of references to surveys, PropertyTypes, JobTitles and Properties, and of permission names. Three things still reach the API with the flag: a missing sub-survey and an unknown AccessRole inpermissionsstill stop the apply, because both are resolved when the survey is written, and a YAML that sets the survey'sidstill has itscodecompared with the server's.validate --remotesaid it checked identifiers; it also checks a survey's references to surveys, PropertyTypes, JobTitles and Properties.
Docs
The question-type reference now says that a +property question's filters and a jobTitle jobs have to be lists, and that a person question needs its personFilter; the troubleshooting page lists this release's new messages with their fix. The apply --dir page no longer says surveys are applied in reference order: they go in path order, so a child survey that does not exist yet has to sort first. The surveys page expands --code and adds that --search matches names.
Migration
- Run
validateover your YAML before you upgrade a CI gate. The two list rules are reported there now, and a file that breaks either one was already being misread on the next apply. - Re-check the surveys
0.12.0applied from a single-valuejobs. They export without their JobTitle codes; add the codes back as a list before re-applying. - Drop
--skip-remote-validationif you added it to get a sub-survey through. The falsenot foundit worked around is fixed, and the flag was switching off the survey's other remote checks with it.
0.12.0 — 2026-09-11
A consolidation release. The headline is that cotctl can now authenticate from the environment, so a pipeline no longer has to hand-write a profile file. Alongside it, two state-machine settings that could only be configured from the webclient became declarable from YAML — and, in the same pass, stopped being silently erased on every apply.
⚠ Breaking changes
validate --dir now fails on two things it used to let through.
A directory that exits 0 today can start exiting 1, for either of two reasons. The first is a survey's semantic errors — repeated identifiers, a reserved identifier, a dependsOn pointing at an identifier that does not exist. Those rules ran only at apply time until now. The second is a file:// reference that does not resolve, in any kind — a PropertyType carrying editable.src: "file://missing.js" passed as a plain string before and now fails the run.
- Who this affects: anyone running
validate --diras a CI gate over a directory of YAML. - What to do: run it once before you upgrade the pipeline, and fix what it reports. Nothing new is wrong with those files — the same failure was already waiting on the next
apply.
conditionalDisplay and command inside a +table column are now rejected.
Neither key was ever evaluated at column level: the client always renders every cell of a table. A YAML that validates and applies today stops doing both.
- Who this affects: anyone whose survey YAMLs put a condition on a table column.
- What to do: move the condition up to the
tablequestion itself, which is the level that is actually evaluated. Conditional display on a top-level question is unchanged.
surveys export now exits 2, not 1, when the simplified format cannot represent the survey.
This matches the contract every other input failure follows — 0 ok, 1 runtime failure, 2 invalid input. A transport or authentication failure still exits 1.
- Who this affects: only a pipeline that tests for
== 1specifically. One that treats any non-zero exit as a failure is unaffected. - What to do: if you branch on the exit code, add
2. And note this is a different2from the one above: a+tablecolumn refusal is a schema failure, which exits1fromvalidate,applyandsurveys applyalike.
surveys export no longer writes conditionalDisplay or command inside a column.
Since neither key does anything at that level, an export → edit → apply round trip was carrying a field with no effect.
- Who this affects: anyone who diffs exports against a file produced by an earlier version.
- What to do: expect the two keys to disappear from the next export. On the raw format this also removes an inert
commandvalue from the backend on the next apply, because a raw round trip replaces the question's content wholesale. Nothing observable changes, but the removal is real.
workflows apply --dry-run reports up to two more preserved fields per state machine.
Nothing about the apply changed. The two fields below stopped being wiped, and a preserved field is also a reported one, so the headline N preserved count grows.
- Who this affects: only a script that parses that number or diffs the dry-run output verbatim.
- What to do: re-baseline the expected output. There is no change in behaviour behind the new count.
Added
cotctlcan authenticate from the environment, with no profile on disk. Export an API token and the API URL of the environment it belongs to, then drop-c/--company:export COTCTL_TOKEN="$CI_COTCTL_TOKEN"
export COTCTL_API_URL="https://www.cotalker.com"
cotctl apply -f survey.yaml --yesUntil now a pipeline had to write
~/.cotctl/config.jsonby hand, reproducing an internal file format. The configuration is now built in memory and nothing is written to disk. The company is read from the token itself, so it cannot disagree with the credential, and one line goes tostderrnaming where the credential came from.Four things worth knowing before you wire it up:
-cstill wins. The variables are consulted only when-c/--companyis absent, so no existing invocation changes meaning ifCOTCTL_TOKENhappens to be exported.- It fails hard when the token is rejected. On a
401, or once the token has expired,cotctlstops and namesCOTCTL_TOKEN— it does not fall back to a password prompt, and it never writes your token into a profile behind your back. - A browser session token is refused. Only an API token is accepted, and the check costs no network call.
COTCTL_COMPANY_IDis optional and asserts which company the job expects. A token belonging to another one stops the run before anything happens, naming both ids.
cotctl login --tokenlogs in with no terminal attached. It takes a pre-generated API token as an argument instead of at a prompt, in three forms: the value itself, a file path (--token @<path>), or standard input (--token -).echo "$CI_COTCTL_TOKEN" | cotctl login --token -Prefer the indirect forms. A bare value sits in the process arguments, where any process on the same host can read it. Neither indirect form can hang:
--token -gives up after 10 seconds and stops reading at 8 KB, and--token @<path>warns — it does not fail — when the file is readable beyond its owner.Do not name that CI variable
COTCTL_TOKEN. That name is reserved as an environment credential and exporting it changes the behaviour of every later command that omits-c.A CI run also needs
--yes, and on most environments--allow-unverified-company: if the token's user cannot read the company record the check cannot conclude, and--yesdeliberately does not answer that one.A state machine can now declare the labels its task cards show. Until now
cardLabelscould only be configured from the webclient. The YAML takes a slot → PropertyType code map, so declaring a slot is what activates it:stateMachines:
- code: sm_po_main
cardLabels:
status1: pt_po_priority
status3: pt_po_supplierSlots may be sparse, and the card renders them in ascending slot order. Omitting the key preserves whatever the webclient configured; declaring the map deactivates every slot it leaves out, and
cardLabels: {}deactivates all of them —--dry-runnow says which labels the card stops showing. An unknown slot key is a validation error, andvalidate --dirresolves each slot against the PropertyTypes declared in the directory, so a typo is caught before the apply turns it into a400.A state machine can now pin the extensions its tasks accept. Same shape, same resolution by code:
stateMachines:
- code: sm_po_main
allowedExtensions:
- pt_po_photo
- pt_po_signatureAn absent key and an empty list are different instructions. Omitting the key preserves the server's list;
allowedExtensions: []declares an empty list and removes every extension the state machine accepted. The list is replaced wholesale rather than merged, so an omitted entry stops being an accepted extension, and--dry-runreports how many would be lost.defaultSelectedTaskTab— the tab a task opens on — now round-trips. The field was invisible tocotctlin both directions, so a workflow configured from the webclient lost the setting the moment anyone rebuilt its YAML from an export. Accepted values arenotes,channel,task,documentsandnull. There is nodetailtab — it has been reported as one, and adetailvalue is rejected rather than sent. An omitted key preserves the server value, an explicitnullclears it.Clearing a webhook's
contextis announced before it happens. An apply that would remove a populatedcontextnow names the slots being dropped and the consequence: the webhook stops being scoped and starts firing for every event of its trigger. Every path announces it — the warning channel on--dry-run, the confirmation preview on an interactive apply, and the warning channel again on an unattended one (-y, orapply --dir). Including under-q, which mutes only progress lines.Two configuration mistakes that used to apply cleanly and then do nothing now warn. A question declaring
dependsOn,showWhen,resetOnHideorresetIdentifiersat its root — those keys only take effect insideconditionalDisplay— and apreloadoronDisplaystage declaringsrcwithoutcontext, which is what registers the hook. Both are warnings, not errors: no exit code changes.applyaccepts-q, --quiet.surveys applyalready had it, so until now the warnings above could not be silenced on the path that applies a whole directory.schedules logsaccepts-v, --verbose, which prints the full stage output alongside the error.⚠
workflows exportoutput gains two fields.cardLabelsandallowedExtensionsare emitted only when they are actually configured, so a workflow that uses neither exports exactly as before — but if you keep exports under version control, the shape of the document changed and it will show up in a review.
Changed
webhooks apply -qnow mutes progress lines instead of warnings. The flag used to drop the warning channel entirely, which meantwebhooks apply -y -q— the canonical CI shape — could clear a webhook'scontextwithout printing a single line. It now suppresses the per-webhookWould CREATE/Would UPDATE/Created/Updatedlines; errors and destructive findings still surface. The flag, its short form and every exit code are unchanged, but a script that parsed those progress lines under-qwas reading output the help text never promised.
Fixed
workflows applywas silently erasing two state-machine settings on every run. A workflow's card labels and its list of allowed task extensions were sent as fixed empty values on every request, including updates — and since the backend replaces them wholesale, each apply cleared whatever the webclient had configured. It happened on workflows whose YAML mentions neither field, so an apply meant to change a name or a transition also erased configuration set from the UI, with nothing in the output saying so. Both now preserve the server value on update, and both became declarable from YAML — see the two entries in Added above.A
2xxresponse carrying no document no longer reads as success. Several endpoints answer200with an empty body for a request that did nothing — a patch against a record that was deleted, or one belonging to another company.cotctlreported the write as done and exited0, which in CI is indistinguishable from success. The writes now assert the document and fail naming the entity and its identifier. The same empty body on the read side used to read as a hit, which produced a string of user-visible failures now fixed:schedules applynever created a schedule — every apply took the update branch.surveys applyreported every free question identifier as already taken, blocking a legitimate apply.surveys applyrefused a rename that never happened, reporting the existing survey's code asundefined.jobtitles applyissued a patch against a nonexistent record. It now creates, as the miss implies.webhooks applyreportedupdatedfor a write that never happened.- A workflow apply could address an invalid task-group URL; it now fails naming the group.
One exception is deliberate: creating a schedule genuinely answers empty by design, so
schedules applystays silent there. Andbots applystill keeps its result when a patch answers empty — the Bot endpoints are documented to do that under some configurations — but it now warns onstderrnaming the bot, so you can tell a real echo apart from a fallback.A non-JSON response no longer surfaces as a parser error. Any response that was not well-formed JSON reached the operator with no status, no URL and no body. Two reported symptoms:
cotctl slas listagainst an environment where the route is not routed showedUnexpected token '<', "<html>...". It now reportsAPI Error 404: Not Found, the method and URL invoked, the content type received, and the first 200 characters of the body.cotctl workflows exportof a workflow with no state machines showedUnexpected end of JSON input. An empty successful body is now an empty result, and a404from the state-machine endpoints means there are none — the command warns and continues instead of aborting, and the YAML it writes omits the key rather than emitting it empty, so it re-applies without deleting anything.
A backend error message that is well-formed JSON still arrives unchanged.
The PropertyType report no longer claims a deletion nobody asked for was ignored. There are two cases and the message only distinguished one. A YAML that declares
schemaNodesand leaves some out is asking for a deletion, andcotctlstill refuses it withpreserved N schemaNodes not in YAML. A YAML that never mentions the section — the hand-written partial file that only touchesdisplayorisActive— asked for nothing, and now readskept N schemaNodes the YAML does not declare (no deletion was requested). Preservation itself is unchanged.The reference documentation for
schemaNodesalso stopped advertising a[]default, which implied that omitting the section and writingschemaNodes: []were equivalent. They are not, and that row is what led people to the message above.A machine identifier pinned at login is no longer silently replaced. The automatic re-login triggered when a token expires re-derived the identifier from the hostname and wrote it over whatever the profile held, so
cotctl login --machine-id ci-runner-3reverted on the first re-authentication — and the minted token's code changed with it. A pinned value is now reused; a hostname-derived one keeps being re-derived, so a renamed host is still picked up. Profiles written before this release are treated as derived — re-runcotctl login --machine-id <id>once to pin the value.webhooks apply:context: nullnow clears a webhook'scontext. Until now it could only be emptied through acontext: {}workaround. Omitting the key still preserves the server value, so no existing YAML applies differently.YAML Result contextomittedpreserved context: nullcleared (recommended) context: {}cleared (legacy, still supported) context: nullis accepted on every trigger, including the non-task ones that reject a populatedcontext— clearing a stale value is exactly what that validation asks you to do.applyno longer throws away every semantic warning. It kept only the entries marked as errors, sovalidatewas the one command in the CLI that ever showed a warning — andapplyis where the problem is actually suffered. Exit codes are unchanged: a warning stays a warning.validate --diraccepts a survey with externalexechooks again. Asrc: "file://./scripts/validate.js"reached the new semantic pass as literal text and was reported as a JavaScript syntax error. References are now resolved before validating, exactly asvalidate -fandapplyalready did.A deactivated PropertyType no longer aborts
workflows apply. A faster batched lookup introduced in this release filtered on active records only, so a workflow referencing a deactivated PropertyType — inpropertyType,asset.propertyType, a card-label slot orallowedExtensions— started failing withPropertyType "<code>" not found. Unresolved codes now fall back to an individual lookup, so the behaviour is back to what it was.A workflow apply resolves its PropertyTypes in one query. It used to ask for each code separately, per state machine: a workflow of 8 state machines with 4 distinct codes each made up to 32 requests where it now makes 1.
A refused
surveys exportnames the question. Several failure paths aborted the whole export with a message identifying neither the survey position nor the question. On a survey with sixty questions that is a message with nowhere to go. Each one now names the chat index and the identifier, and points at--format raw.--format rawis the supported escape hatch for a legacy survey, not just a debugging aid. It exports the survey verbatim and re-applies unchanged; it was previously mentioned only in passing.A simplified export that silently dropped content now warns. The worse failure was not the abort above but the successful export of an incomplete document: the YAML looks fine, gets committed, and the next apply is what removes the missing questions. Three cases now print to
stderrnaming what was left out, withstdoutuntouched so piping and-oare unchanged — a chat bubble of an unexpected content type, a legacy bubble packing several questions into one, and a standalone text question consumed as somebody else's label because of how its identifier is spelled.A taken question identifier now says which question took it. The message stopped at "it exists elsewhere", so you had to export in raw and dig the id out by hand. It now carries the id, the label, the type, whether the question is still active, and the export command to run. The owning survey itself cannot be named — the API offers no way to reverse that lookup.
schedules logsrenders the error the backend was already sending. A failed stage printed a date andexecutedand nothing else, while the detail sat unread in the response. The error now prints under the existing line whenever there is one. The current line and--jsonare unchanged, so a script parsing either keeps working.workflows applystops offering an escape hatch it rejects. When the permission catalogue did not answer, the message suggested retrying "or skip with--skip-remote-validation" — a survey-only flag that every path reaching a workflow refuses, so anyone following the suggestion got an error. It now says what actually works, and states that a workflow has no bypass flag.A workflow dry run says when it could not resolve the PropertyType codes. The lookup behind
cardLabelsandallowedExtensionsused to degrade to nothing and say so nowhere, so the diff reported no change for those fields — a dry run could look clean because the lookup had failed rather than because nothing had changed.A login that supplies its own token no longer reports having created one. With
--tokenor--paste-tokenthe success line readAPI token "…" createdand printed a revoke URL, for a token you did not mint and a panel you may not be able to reach. Both now reportacceptedand print no revoke line.-qsaid something false in seven commands, and now separates two classes of message. The help text forapply,bots apply,schedules applyandroutines applypromised to suppress non-fatal warnings without saying that a destructive finding is not one of them; onproperties apply,surveys applyandworkflows applyit announced "Only output errors" while a⚠ DANGERline still reachedstderrunder it. The flag's behaviour is unchanged — only the promise was false.Behaviour did change in one place:
-qnow really does silenceapply's Workflow warnings, which kept printing "Unknown bot type …" despite the flag. And the rule that holds everywhere:-qnever silences a destructive finding, on any kind. Progress lines and advisory warnings are muted; a finding that announces data being removed is not.The
--legacy-replacewarnings are in English, and no longer announce a removal that already passed.apply,workflows applyandsurveys applyprinted their escape-hatch warning in Spanish — the only non-English runtime text in the CLI — and promised the flag would disappear in a version this release is four and five minors past. Both flags are still present and behave identically; the text now states they are deprecated with no removal version announced.Smaller message fixes. A
subfilterValueerror named the wrong field and offered no way out; it now says the value is required unless the subfilter is*. Ajobtitles applythat falls back to creating because a record disappeared between listing and lookup now says so instead of doing it in silence. A workflow whose task group is missing now fails with a message naming it instead of a bare404. Andsurveys applyno longer prints its warnings in two different shapes — the mobile table warning now looks like every other warning.The assistant guidance bundled with the CLI was corrected on five points. These strings are compiled into the binary, so a wrong one cannot be fixed until the next release. It described two survey behaviours the CLI does not have; it taught a deprecated full-collection scan for job titles; it stated that every command requires a profile, which stopped being true with the environment credential above; it knew neither half of
schedules logs; and it presented avalidate --dir→apply --dirpipeline over twelve kinds whenvalidate --dirrecognises seven, so a directory holding routines, SLAs, schedules, bots or webhooks stopped at the validation step.
Known limitations
These are named, not fixed. They are worth knowing before you build a pipeline on them.
applynever prints the destructive-findings block. The⚠ DANGER/⚠ WARNINGblock a dry run shows undersurveys apply,workflows applyandproperties applyis not rendered by the genericapply— it computes the findings and discards them, and it declares no--fail-on-destructiveeither. For surveys, workflows and properties that block is the only place those findings surface, soapply --dir --dry-runis the quietest preview available: silent about exactly the changes that cannot be undone. Use the per-entity command when you want a preview that flags them. Webhooks are the exception — their findings also go through the warning channel, whichapplydoes print.schedules list --op failedcannot find a stage that failed inside the bot. The scheduler does not mark the run as failed in that case, so a health check built on that filter reports green through a schedule failing every night. The gap is in the backend, not in the CLI.schedules listaccepts a single-run filter it never applies. The flag is parsed and never forwarded, so the listing comes back unfiltered and exits0. Filter the--jsonoutput instead.-l, --limitonschedules listbounds what the backend returns, and the active filter runs afterwards, client-side — so a listing can come back shorter than the limit.
Migration
- Run
validate --dironce before you upgrade a CI gate. Two new classes of failure are reported there now, and both were already waiting on the next apply. - Re-export if you keep YAML under version control. Workflow exports gain two fields, survey exports drop two keys inside table columns, and neither change is a behaviour change — but both show up as a diff.
- Re-pin a machine identifier. A profile written before this release is treated as hostname-derived, so run
cotctl login --machine-id <id>once if you rely on the flag. - Check exit-code branches on
surveys export. A simplified-format refusal now exits2instead of1.
0.11.0 — 2026-09-01
⚠ Breaking changes
cotctl slas apply no longer forces pb.version: 'v3' when updating an SLA.
The default still applies when creating one. On update, a YAML that omits pb.version (or carries it as null / "") now leaves the server's value untouched instead of overwriting it with 'v3'.
Who this affects: anyone who relied on
applyto normalize SLAs created outsidecotctlup to V3. Those SLAs stay on whatever engine they have. If their bots use COTLang expressions ($VALUE#...,$INPUT#...) in the stagedata, those go unresolved under V2 — with no error.What to do: pin the version explicitly in the YAML —
pb:
version: "v3"
start: ...An explicit
pb.versionwas never touched byapply, on create or on update, and still is not.
A table question written in the simplified format is now validated exactly like the raw format.
The simplified schema previously skipped several checks the raw format always enforced — allowed column types, no nested tables, the column count and row limits, the column identifier charset, required column headers, and the per-column-type requirements. A survey YAML with a table question that passed validate before may now be refused.
Who this affects: anyone whose survey YAMLs carry
tablequestions written in the simplified format. The payloads now being refused were already failing, or silently misbehaving, on the server — the missing checks only hid that until now.What to do: re-run
validateover those files before your next apply —cotctl validate -f survey.yamlA new refusal means the YAML was relying on one of the gaps above, so fix it as the error describes rather than reading it as a regression.
Added
tablequestions now round-trip through the CLI.exportwrites a table'scolumns— previously dropped, so an exported YAML described a table with no columns — andapplyvalidates and applies them, in both the raw and the simplified YAML formats.A saved table and its columns are protected from destructive edits. Removing the table (or changing its identifier), removing a column (or changing its identifier), changing a saved column's type, and reordering, renaming or removing a saved option — each of these would silently orphan or re-label answers already stored, so all four are now refused, in
--dry-runas much as in a real apply. Renaming a table or a column is still fine — only the identifier is frozen — and so is adding a new column or appending new options.applywarns when a new table won't render on mobile yet. It works on web today; mobile support is coming in a later app release.--allow-unverified-companyonloginlets you continue when the environment can't confirm which company a token belongs to — see the company-verification fix below.cotctl login --url web.cotalker.com --subdomain acme --allow-unverified-company-y, --yesonloginoverwrites an existing profile without asking, and runningloginwithout a terminal now fails fast instead of hanging.cotctl login --url web.cotalker.com --subdomain acme --yesapplyreports the PropertyType schema fields it preserved, instead of merging them back silently:Updated: office_location (preserved 1 schemaNode not in YAML: 'city')and
--dry-runshows the same information before anything is sent. Deleting a schema field through YAML still isn't supported — useisActive: falseto retire one.These release notes are now generated automatically. Every
cotctlrelease opens a draft pull request against this page with the new section already drafted; it is reviewed and curated before it merges, so what you read here has been through a human pass.
Changed
cotctl login --urland--api-urlnow accept a host with no scheme.--url web.cotalker.comresolves tohttps://web.cotalker.com, and the command prints the URL it resolved. An explicithttp://is honored, for local and on-premise environments without TLS.
Fixed
login's API-URL autodiscovery no longer hangs, and explains what it tried when it fails. Every attempt is now bounded (6 seconds per candidate, 10 seconds for the whole sweep), thewww.↔web.sibling host is tried as a fallback, and a failure lists every URL it tried and why. It also stops picking up a commented-outapivalue from a whitelabel configuration file — which used to makelogindiscover, and authenticate against, the wrong host.loginrefuses to save a profile for the wrong company. The browser sign-in flow authenticates against whichever Cotalker session the browser already has, so signing in with another company's session open used to save a profile pointing at that company, silently.loginnow verifies the company after minting the token and before writing anything, and fails on a mismatch — naming both companies and how to fix it. When the company can't be verified at all,loginasks before saving;--allow-unverified-companyis how to proceed without a terminal. This is a behavior change for unattendedlogin: a scripted run against an environment that can't expose its company used to succeed with a warning; it now fails unless you pass the flag.- A cancelled profile overwrite now fails instead of reporting success. Answering anything but
yto the overwrite prompt used to exit0. It now exits1, on stderr. If a script only checks the exit code, this is a behavior change — a cancelled login now stops the pipeline instead of continuing with an unwritten profile, which is the intent. Profile savedis now verified against the file.loginre-reads the config after saving and confirms the profile is actually there before printing success, naming the exact path (Profile saved as "acme" to ~/.cotctl/config.json).surveys exportno longer overwrites one exec script with another. Two questions that produced the same extracted-script filename used to collide, and the second write silently won. Exported script files change name as a result of this fix — re-export rather than renaming existing files by hand.- Four
--helpdescriptions asserted things that were already false. Two flags claimed a removal that never happened, andproperty-types get --show-inactivepromised a filter it doesn't apply (inactive fields are already listed by default, tagged[INACTIVE]). No flag changed name or behavior — only what--helpsaid about them. surveys list --helpno longer advertises a-cshort form for--code.-cis already the global--companyflag, so the short form never reached--code— it silently searched for a profile with that name instead.--codeitself is unaffected.- The AI assistant's built-in guidance is corrected on two points it had gotten out of sync on: a workflow's
iconfield takes SVG path data, not an icon name, and a routine invoked from a bot stage takes its declared inputs as sibling keys ofcodein the samedatablock — omitting a required one never fails the apply, the routine just runs with that input empty.
Migration
A YAML exported by an older version has no columns block on its table questions, because export used to drop them. Re-applying such a file against a survey whose table already has saved columns now trips the "column exists but is missing from the YAML" refusal — once per column, since from the file's point of view every column disappeared. Re-export those surveys before re-applying them.
0.10.0 — 2026-08-21
⚠ Breaking changes
--allow-script-bots is now required on every apply path.
Applying a YAML that declares a stage of a script-executing bot type — PBScript, CCJS or ESMCode — now fails before anything is created or modified. Until this release the gate only existed on cotctl workflows apply; through the other paths such a bot applied silently and ran arbitrary JavaScript at runtime.
It now covers bots apply, slas apply, schedules apply, routines apply, and both apply -f and apply --dir — which previously had no way to pass the flag at all.
- What to do: re-run the same command with
--allow-script-botsto opt in explicitly. Pipelines that apply these bot types will start failing until you add it. The error message names each offending stage and its type. - Careful in CI: the refusal doesn't use one exit code.
bots applyandroutines applyexit 2;slas apply,schedules apply,workflows applyandapply -f/apply --direxit 1. If your script branches on the exit code, pin it to the command you actually invoke.
webhooks apply rejects a populated context outside the task trigger.
Scoping by survey / group / taskGroup only means something for create-edit-delete-task. On any other trigger the backend accepts it and then matches no event at all, so every delivery is dropped without a warning.
- What to do: change the trigger to
create-edit-delete-task, or removecontext. An emptycontext: {}is still accepted everywhere, so clearing a stale value keeps working.
A PBScript stage whose data.code isn't in your routine catalogue is rejected.
The code is now resolved against the live catalogue at apply time, with a suggestion when a close match exists. Before, the backend accepted any string and failed in production instead.
- What to do: fix the typo, or apply the routine first.
apply --diralready ordersRoutinebeforeSlaandSchedulefor exactly this reason.
Duplicate stage.key values inside one bot are rejected.
- What to do: give each stage a distinct key. Repeated keys made
stage.nextandbot.startambiguous and broke the stage-identity fix below.
permissionsV2 on a Survey is validated against the permission catalogue.
The field takes permission strings, never AccessRole names — passing a role name used to produce an opaque HTTP 500.
- What to do: replace role names with permission codes. Matching is case-sensitive. Use
--skip-remote-validationif the divergence is intentional.
Added
applyretries rate limits on its own. AnHTTP 429now backs off and retries up to 3 times, honouringRetry-Afterwhen the backend sends it. Largeapply --dirbatches no longer abort halfway and need a manual re-run.- Exit code
3for a partial apply. When a Workflow apply fails after creating some resources, it leaves orphaned records behind.apply --dirandworkflows apply -fnow exit3so CI can tell "needs manual cleanup" apart from an ordinary failure.cotctl apply -fdoesn't subscribe to the signal and still exits1— pin your CI branch to the command you invoke. validate --dirunderstandsJobTitleandUser. Both are now schema-checked offline instead of falling through as an unrecognized kind. Seven kinds are recognized — still fewer than the twelveapply --dirhandles, soRoutine,Sla,Schedule,BotandWebhookare not covered yet.--dry-runresolves references inside the same batch. A permission code, an AccessRole → JobTitle or a JobTitle → User reference defined in another document of the same run no longer reports a false failure.scaffoldaccepts state names as you type them.--states "Aprobada" "En compra"keeps the display name and derives thecodeslug from it; you no longer have to pre-slugify by hand and lose the label.- Non-blocking warnings for three documented data traps that previously only surfaced at runtime.
Fixed
- SLA state references resolve to the right id. An SLA whose
start.states[]/end.states[]used state codes resolved to the wrong record and was rejected withHTTP 500: SMStates not found. Codes now work as documented, and remain the recommended form. If you write a raw ObjectId there it must be theSMState._id. - Bot and SLA stages keep their identity across applies. Stage ids were reassigned on every apply, producing a permanent false diff in
--dry-runthat never converged. surveyssearch no longer returns the whole catalogue when the search term sanitises to an empty string.workflows applycan clearrequiredSurveyagain, and the dry-run preview now shows changes tonext[].canChange,next[].requiredSurveyandnext[].bots— they were being applied without appearing in the preview.- Multi-document files are dispatched per document. A YAML mixing several
kinds was previously dispatched by the first document's kind alone. - The bundled AI skills stated the wrong
apply --dirorder. Six of them had drifted and listedSurveyafterWorkflow— the inversion that orphans records when a state machine fails to create. If you author YAML with an assistant, this is worth re-reading.
Docs
Reference pages updated for subfilter / subfilterValue on properties, dataType[] when a stage invokes a routine, surveyTriggers preserve-vs-delete semantics, the validate exec-hook contract, and the transitions[].requiredSurvey clearing semantics.
Older releases. Versions before 0.10.0 are not documented here. If you're on one of them, upgrade to the latest and read the section above before your next apply.