Logo von Kortix Rollback

Kortix Rollback

OrganisationBeliebt
kortix-ai
kortix-rollback

How to roll Kortix PRODUCTION back to an older already-released version — the inverse of a release. Covers the one-dispatch rollback-prod.yml engine (--ref prod, shares the deploy-prod concurrency group), the per-surface mechanics (api with KORTIX_PROCESS_ROLE=all and the worker scaled to 0, gateway = immutable :X.Y.Z image; Vercel frontend = promote), what undoes a rollback (any deploy-prod run, any push to prod), the DB/migration-drift check that is the real blocker, and how a later promote returns prod to latest. Load WHENEVER the user wants to roll back / revert / downgrade / 'go back a version' on prod, asks how the rollback or the frontend rebuild-skip behavior works, or needs to run rollback-prod.yml. Pairs with kortix-release (the forward direction).

Übersicht

Herausgeberkortix-ai
RepositoryCompanyOS
Skill-Namekortix-rollback
Sterne
20.8K
Forks
3.5K
Mitgelieferte Dateien
Nur Anweisungen
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von kortix-ai auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Kortix Rollback in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/kortix-ai/CompanyOS/tree/dev/.agents/skills/kortix-rollback
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kortix-ai/CompanyOS.git /tmp/CompanyOS
mkdir -p .claude/skills
cp -r /tmp/CompanyOS/.agents/skills/kortix-rollback .claude/skills/kortix-rollback
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Kortix Rollback in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Kortix Rollback automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Kortix Rollback nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Kortix Rollback

The inverse of kortix-release. A release moves prod FORWARD onto new code; a rollback re-points prod at an OLDER already-released vX.Y.Z, reusing that release's prebuilt artifacts (zero rebuild). Use it when a shipped version is breaking and the move is "go back now, fix forward later." The next forward release still comes from staging, not directly from dev.

A rollback is temporary, never sticky. It rolls ECS services and promotes an old Vercel build. It never pushes to prod, never touches VERSION or a branch, and never moves an image tag. The next deploy-prod run supersedes it and returns prod to the version in prod:VERSION (see §6).

1. The one command

bash
gh workflow run rollback-prod.yml --repo kortix-ai/CompanyOS --ref prod \
  -f version=vX.Y.Z -f reason="<incident summary>" -f confirm="ROLLBACK PROD"

--ref prod is required: the job runs in environment: prod, which admits the prod branch only. The run shares the deploy-prod concurrency group with deploy-prod.yml, so a rollback dispatched during a release roll starts when that roll ends. GitHub keeps one pending run per group: a rollback dispatched while a deploy-prod run waits replaces the waiting run.

It plans each backend surface from the images that exist for X.Y.Z (a surface with no :X.Y.Z image is skipped), then rolls in this order, one step after the other:

  1. api (ECS): ecs-deploy.sh prod kortix/kortix-api:X.Y.Z --process-role all. The api tasks run the scheduled jobs. After that rollout is stable the script scales kortix-prod-worker to 0. The worker is never rolled here.
  2. gateway (ECS): kortix/kortix-gateway:X.Y.Z.
  3. frontend (Vercel): promotes the production deployment whose commit message names release vX.Y.Z. Skipped without VERCEL_TOKEN; fails when no such deployment exists. kortix.com runs on Vercel only: the parallel ECS frontend (prod-fe-ecs.kortix.com) was removed in 2026-11.

A failed step stops the run: the surfaces before it are on X.Y.Z, the ones after it are on the current version. Read the step log, not the summary table: the summary prints the plan, not the result. Re-run with -f surfaces=<the rest>.

What it does not do:

  • It moves no image tag. :latest, :prod and :stable stay on the current version, so self-hosted boxes keep what they run.
  • It opens no pull request and merges nothing into prod (the job has contents: read).
  • It does not roll the database back (§4).

2. Per-surface mechanics

The backend (API, worker, gateway) runs immutable images on ECS Fargate. infra/scripts/ecs-deploy.sh registers a new task-definition revision that points at the :X.Y.Z image and waits until the service is stable. The image is frozen, so the roll is exact.

The Vercel frontend is built on the deploy-prod.yml runner and uploaded prebuilt (infra/scripts/vercel-deploy-prebuilt.sh). Vercel keeps every deployment's output, but there is no image tag. A Vercel rollback is a promote of the old production deployment. The branch still holds the newer frontend code.

3. What undoes a rollback

Nothing records that prod is rolled back: the state lives only in ECS and Vercel. Each of these returns prod to the version in prod:VERSION:

  • Any deploy-prod.yml run. A push to prod (a release merge) or a manual dispatch (rebuild_desktop, a re-run) rolls worker, api and gateway to prod:VERSION, redeploys the Vercel frontend, and switches the api back to KORTIX_PROCESS_ROLE=web. Do not dispatch deploy-prod.yml while prod is rolled back, unless you mean to roll forward.
  • Vercel never builds on a push. The Vercel project has no Git connection, and apps/web/vercel.json sets git.deploymentEnabled: false. kortix.com changes only through deploy-prod.yml (deploy-web-vercel), so a Vercel instant rollback of the frontend holds until the next deploy-prod.yml run.

Until one of these runs, the worker stays at 0 and the api runs the scheduled jobs (KORTIX_PROCESS_ROLE=all). Nothing expires that state: plan the roll forward.

4. Safety check BEFORE you roll — DB / state drift is the real blocker

The image-reuse + Vercel-promote mechanics work for any released version. What actually makes a rollback unsafe is forward state the old code can't handle — overwhelmingly the database.

Migrations in this repo are forward-only and additive by convention (ADD COLUMN/VALUE, CREATE … IF NOT EXISTS). Against additive migrations old code is safe: the live schema is a strict superset of what the old version needs. Never reverse a migration — that's what breaks things, not rolling code back.

The danger is a destructive migration between the target and current — a DROP COLUMN, RENAME, ALTER … TYPE, or a new NOT NULL. Old code hitting that breaks. The plan step prints how many migrations prod has that vX.Y.Z lacks, and a ::warning:: names the files that contain one of those statements. It does not refuse: a person decides. Check it before you dispatch:

bash
git diff vX.Y.Z..origin/prod -- packages/db/migrations
  • All additive (ADD …, CREATE … IF NOT EXISTS) → DB-safe to roll there.
  • Any DROP / RENAME / ALTER … TYPE / new NOT NULL → stop and think.

Lesser, non-DB couplings (rare long tail): forward-written persisted state old code can't parse (queue/cache formats), or external contract changes (Stripe API version, webhook shapes).

Kortix Apps: static hosting and retention do not roll back

Two Apps changes ship in one release and survive a code rollback:

  1. Static Apps go offline on an older api. A static App is served by the api from storage (apps/api/src/apps/static-site.ts) and has no app_runtimes row. An api that predates that file requires a runtime, so every static App answers with a status page until the next promote. rollback-prod.yml refuses such an api target unless static_apps_ack is exactly STATIC APPS OFFLINE. Rolling only gateway,frontend is not affected.

  2. Retired deployments stay retired. The first maintenance pass after the release retires every ready deployment beyond the active one and the newest KORTIX_APPS_RETAINED_DEPLOYMENTS (default 5), 50 Apps per pass. It tears down their runtimes and images; reclaimAppArtifacts deletes their archives 24 h later. A rollback cannot bring them back. Before the first release, count what it will retire:

    sql
    select app_id, count(*) - 6 as retired
    from kortix.app_deployments where status = 'ready'
    group by 1 having count(*) > 6;

    To defer it, set KORTIX_APPS_RETAINED_DEPLOYMENTS high on prod for that release and lower it on the next one.

Email: received mail waits for the roll-forward

From the release that stores each received email before the ack (KRTX-2235 step 3), the api puts Email on the integration.events.email job queue. An older api never claims that queue, so emails stored before the rollback stay queued until a later promote runs them; Resend got its 200 and does not resend. Nothing is lost, only late. List what waits:

sql
select job_key, created_at from kortix.job_queue
where queue = 'integration.events.email' and status = 'queued' order by created_at;

If a sender must not wait and the rollback target has the Resend route (POST /v1/webhooks/email/resend, first shipped after v0.14.8), replay that email from the Resend dashboard: the older api handles it, and the stored copy is a no-op at the roll-forward (its session create already started, or its follow-up key exists). A target without that route receives no Resend mail at all; Resend's own retries (8 over about 31 h) then decide what arrives after the roll-forward. Delete nothing.

5. Per-surface availability (the engine handles this)

You can't roll a surface BELOW where it existed. The gateway only entered prod at ~v0.9.72 (image exists from 0.9.69), so there is no kortix-gateway:0.9.68. The workflow checks each image (Docker Hub tags API) and skips any surface with no :vX.Y.Z image rather than wedging ECS on ImagePullBackOff.

6. Resuming — a later release returns prod to LATEST

You do NOT manually undo a rollback. To resume, get the fix onto staging and Promote to Production (see kortix-release). Its merge into prod runs deploy-prod.yml, which rolls ECS to the new version, scales the worker back up, and builds and deploys the latest Vercel frontend.

7. Gotchas

  • Never roll an ECS service from a laptop while a deploy workflow can run (learnings ledger, 2026-11-01): the workflow's concurrency group does not see a local roll. Use this workflow.
  • Verify after: api.kortix.com/v1/health (version), ECS service health, kortix.com/api/health (version), and the live Vercel production deployment (/v9/projects/{id} → targets.production).

Häufig gestellte Fragen

Was macht der KI-Skill Kortix Rollback?

How to roll Kortix PRODUCTION back to an older already-released version — the inverse of a release. Covers the one-dispatch rollback-prod.yml engine (--ref prod, shares the deploy-prod concurrency group), the per-surface mechanics (api with KORTIX_PROCESS_ROLE=all and the worker scaled to 0, gateway = immutable :X.Y.Z image; Vercel frontend = promote), what undoes a rollback (any deploy-prod run, any push to prod), the DB/migration-drift check that is the real blocker, and how a later promote returns prod to latest. Load WHENEVER the user wants to roll back / revert / downgrade / 'go back a...

Warum Kortix Rollback in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Kortix Rollback besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Kortix Rollback in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/kortix-ai/CompanyOS/tree/dev/.agents/skills/kortix-rollback ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Kortix Rollback nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Kortix Rollback verwenden?

So viele Sie möchten. In TypingMind können Sie Kortix Rollback mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Kortix Rollback kostenlos?

Der Skill wird von kortix-ai auf GitHub veröffentlicht. Prüfen Sie im Repository, ob dort Lizenzbedingungen angegeben sind. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇