cron-model-migration
Safely change models for OpenClaw cron jobs without leaving behind session/model mismatch errors. Use when creating or editing cron jobs with `payload.model`, when moving a job between models/providers, when diagnosing `LiveSessionModelSwitchError`, or when deciding whether a cron should run in `sessionTarget: "isolated"`, `"current"`, `"main"`, or a custom persistent session.
What this skill does
# Cron Model Migration ## Overview Use this skill when a cron job needs a model change or when cron runs fail after a model change. The goal is simple: avoid reusing a session that is already bound to a different model. ## Core rule Prefer **`sessionTarget: "isolated"`** for cron jobs that set `payload.model`. Why: - isolated jobs run dedicated agent turns instead of sharing the main session - isolated runs are the safest place to override model/thinking - persistent/shared sessions are where model-switch residue shows up most often If a cron does **not** need shared conversation history, keep it isolated. ## Decision tree ### Case 1 — New cron job with a specific model Create it as: - `payload.kind = "agentTurn"` - `sessionTarget = "isolated"` - `payload.model = <target-model>` Do **not** bind it to `current` or `session:xxx` unless you explicitly need persistent context across runs. ### Case 2 — Existing isolated cron, same session pattern, just changing model Safe workflow: 1. Confirm the job is not actively running. 2. Disable the job. 3. Update `payload.model`. 4. Restart Gateway if the job has recently been running or already failed with a model-switch error. 5. Re-enable the job. 6. Force-run once and inspect the result. If it still throws `LiveSessionModelSwitchError`, stop trying to patch it in place. Rebuild the job fresh. ### Case 3 — Existing cron bound to `current` or `session:xxx` Treat this as **high risk** for model residue. Best practice: - create a **new job** instead of editing the old one in place - move it to `sessionTarget: "isolated"` unless persistent context is truly required - if persistent context is required, use a **new custom session id** instead of reusing the old one Do not reuse a persistent session and expect model changes to be clean. ### Case 4 — Main-session cron Avoid model overrides on main-session jobs unless there is a strong reason. Why: - main-session jobs share context with the main agent session - changing model there can shift the shared session unexpectedly - OpenClaw docs recommend model overrides primarily for isolated jobs If the task needs a different model, split it into an isolated cron instead. ## Recommended migration workflow Use this sequence for production changes: 1. **Inspect** - confirm `sessionTarget` - confirm `payload.kind` - confirm current `payload.model` - check recent run failures 2. **Classify** - isolated + stateless → update in place is usually fine - current/custom/main → prefer rebuild 3. **Apply** - small change: disable → update → restart → enable → force-run - risky change or prior switch error: create a new isolated job with the new model 4. **Verify** - run exactly once with `cron.run` - verify the run completed, not merely enqueued - verify delivery/output still works 5. **Cut over** - only remove the old job after the replacement job succeeds ## Anti-patterns Avoid these: - changing `payload.model` and immediately force-running repeatedly - reusing `sessionTarget: "current"` for jobs that need model churn - editing a persistent `session:xxx` job without changing the backing session id - assuming `cron.run` enqueue success means the agent turn succeeded - debugging only the prompt while ignoring session binding ## Troubleshooting `LiveSessionModelSwitchError` When you see: - `LiveSessionModelSwitchError: Live session model switch requested: ...` Assume one of these first: 1. the job is reusing a live or persistent session already bound to another model 2. the job was edited in place after prior runs left session state behind 3. the job is using `current`, `main`, or a custom persistent session where override behavior is unsafe Response order: 1. inspect job config 2. confirm `sessionTarget` 3. confirm whether the run is isolated or persistent 4. restart Gateway if stale execution state is plausible 5. if still failing, replace the job with a fresh isolated one ## Minimal safe templates ### Stateless background analysis Use: - `sessionTarget: "isolated"` - `payload.kind: "agentTurn"` - explicit `payload.model` - optional `delivery.mode: "announce"` or `"none"` ### Persistent weekly summary that truly needs memory Use: - `sessionTarget: "session:<new-id>"` - `payload.kind: "agentTurn"` - explicit `payload.model` - accept that model changes later should usually mean **creating a new session id/job** ## Practical rule of thumb If you need to ask “can I safely switch this cron’s model in place?”, the default answer is: - **yes** for isolated/stateless jobs, with one controlled validation run - **no** for shared or persistent jobs; rebuild instead
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.