unsloth/.github/workflows
Daniel Han c1e06e9ddf
unsloth start: add --persist to keep and reopen agent sessions (#7014)
* unsloth start: add --resume to persist and reopen agent sessions

`unsloth start <agent>` launches a coding agent whose home is a throwaway
temp dir wiped on exit, so codex/openclaw/hermes/pi (which relocate their
whole home there) cannot resume a conversation after you quit. opencode and
claude keep their session data in a fixed user dir, so they already resume.

Add an opt-in --resume/--no-resume flag: it routes the launch to the stable
Unsloth agents dir (the same one --no-launch already uses) so the session
survives the exit, never touching the user's own ~/.<agent>. A bare --resume
also reopens the last conversation via the agent's native flag (codex
`resume --last`, opencode/claude/pi `--continue`). The default is unchanged:
a plain launch still uses a temp dir and persists nothing.

Add a dispatch-only `resume` job to the Local Agent Guides CI that drives the
real launch path and asserts the split: codex/pi are wiped without --resume
and persist with it, while opencode/claude persist either way.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* unsloth start: rename --resume to --persist

The session flag collided with agents' own resume flags. `unsloth start
claude --resume <id>` used to forward `--resume <id>` straight to Claude
(which keeps its history in ~/.claude regardless), so a boolean --resume on
unsloth start would have swallowed the session id and turned it into a stray
prompt. Name the persistence flag --persist instead, so every agent's native
resume flag (claude --resume <id>, codex resume, opencode --continue, ...)
still passes through untouched. Behavior is otherwise identical: --persist
keeps a launched agent's session under the Unsloth agents dir, and a bare
--persist reopens the last conversation.

Add a regression test that `--resume <id>` passes through verbatim, and in the
CI resume experiment skip the redundant second pass for opencode/claude (they
persist either way, and a second CPU turn only risks a timeout).

* unsloth start: correct --persist help and drop the buggy auto-resume

Reword the --persist help to be accurate: claude and opencode keep sessions in
the user's own stores and resume regardless, so --persist only stabilizes the
otherwise-ephemeral relocated home of codex/openclaw/hermes/pi. Drop the
bare-launch auto-append of native resume tokens: it errored on a first launch
with no prior session, and was inconsistent between launch and no-launch.
--persist now only keeps the session dir; resume via the agent's own command
(e.g. `unsloth start codex --persist resume`), which now finds it.

In the CI resume experiment, fail the pass when the launched turn exits
non-zero, so a write-then-error is not misread as PERSISTED.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-07-09 11:47:59 +02:00
..
consolidated-tests-ci.yml Fix duplicate unsloth/gemma-2b-bnb-4bit mapper key routing the base 4bit repo to the instruct model (#6891) 2026-07-08 17:40:39 -03:00
cross-platform-parity-ci.yml Run cross-platform parity test on Windows and macOS in CI (#6241) 2026-06-12 03:40:50 -07:00
lint-ci.yml Lint CI: diff import-hoist check against the PR merge-base, not the base tip (#6190) 2026-06-11 04:23:41 -07:00
local-agent-guides-ci.yml unsloth start: add --persist to keep and reopen agent sessions (#7014) 2026-07-09 11:47:59 +02:00
lockfile-audit.yml CI: pin lockfile-audit actions to commit SHAs (#6902) 2026-07-06 07:11:33 -07:00
mlx-ci.yml CI: add PyPI extra-index to CPU torch installs to fix sympy resolution (#6660) 2026-06-29 17:35:26 -03:00
notebooks-ci.yml CI: add PyPI extra-index to CPU torch installs to fix sympy resolution (#6660) 2026-06-29 17:35:26 -03:00
ossf.yml Create ossf.yml (#6952) 2026-07-07 17:10:01 -07:00
release-desktop.yml Verify linuxdeploy AppImage digest before use in desktop release (#6673) 2026-06-25 20:45:24 -07:00
security-audit.yml Package scanners: cut false positives and make the CI gate blocking (#6355) 2026-06-16 01:46:15 -07:00
stale.yml CI: scope GITHUB_TOKEN permissions, add MLX CI, unblock ~60 skipped tests (#5312) 2026-05-11 03:19:13 -07:00
studio-api-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-backend-ci.yml [Studio] Add --with-llama-cpp-dir installer flag to reuse a local llama.cpp (#6472) 2026-07-02 22:11:20 +01:00
studio-export-capability-ci.yml Studio: multi-select export formats, portable FP8/INT8, GGUF LoRA, and source parity (#6767) 2026-07-03 08:25:10 -07:00
studio-frontend-ci.yml Frontend CI: hard-fail unreviewed npm install scripts (#6139) 2026-06-10 06:10:16 -07:00
studio-inference-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-load-orchestrator-ci.yml studio: unblock /load event loop on detect_audio_type (#5642, #5635) (#5669) 2026-05-22 05:47:58 -07:00
studio-mac-api-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-mac-inference-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-mac-install-matrix.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-mac-ui-smoke.yml Harden flaky Studio CI: retry VS-hide rename and tolerate same-URL nav interrupt (#6713) 2026-06-26 19:45:46 -07:00
studio-mac-update-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-tauri-smoke.yml Fix Linux AppImage packaging (#6657) 2026-06-24 19:40:00 -07:00
studio-ui-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-update-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-windows-api-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-windows-inference-smoke.yml Stabilize floating monitor drag (#6984) 2026-07-09 00:16:05 -07:00
studio-windows-ui-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-windows-update-smoke.yml Studio: source CPU llama.cpp prebuilts from unslothai/llama.cpp (#6311) 2026-07-08 05:34:59 -07:00
version-compat-ci.yml version-compat CI: fake CPU training runs for SFT/GRPO/DPO (#6965) 2026-07-08 04:06:28 -07:00
wheel-smoke.yml ci: drop cache: 'npm' from setup-node (silent abort on Windows) (#5474) 2026-05-15 20:49:05 -07:00