如何在 11 月 11 日前匯出 Google Jules 資料並遷移至 Claude Code 或 Codex
How to export your Google Jules data before November 11 (and move to Claude Code or Codex)
Google Jules 將於 2026 年 11 月 11 日後轉為唯讀,並於 12 月 31 日關閉;本文整理如何在期限前匯出資料並遷移至 Claude Code 或 Codex。
Google announced on October 29 that Jules is winding down. The dates, from the official changelog:
- Until November 11, 2026: you can keep working and finish sessions.
- After November 11: Jules turns read-only.
- December 31, 2026: Jules shuts down.
Your code, branches and pull requests already live in GitHub, so they're safe. What isn't in GitHub is everything Jules kept on its side: settings, environment variables, scheduled tasks, per-repo setup scripts, memories, and the full history of every session. Google published an export for exactly that. Here's how I'd run it, what you get, and where each piece goes in Claude Code or Codex.
Step 0: clean up open work first
Before exporting, go through your open Jules pull requests and merge or close them. Any session you still want to finish has to be done before November 11. After that you can read it, but you can't continue it.
Step 1: install Jules Tools and sign in
npm install -g @google/jules
jules login
jules login opens a browser sign-in, so run it yourself in a terminal.
If you used Jules with GitHub repos, check that your GitHub account is still connected to Jules. Google's note is blunt: if it isn't, the export won't include repository data. A quick test is:
jules remote list --repo
If that fails with a 401 that mentions GitHub, connect the account at https://github.com/apps/google-labs-jules/installations/select_target and try again.
Step 2: run the official export prompt
The changelog page has an "export prompt" (click "Show the export prompt"). Open a CLI coding agent such as Claude Code from your home directory, paste the whole prompt, and let it work. The prompt tells the agent to check your setup, save a Python script, run it, and report counts. It also tells the agent not to print your token or env var values.
A few things the prompt itself warns about, worth knowing up front:
- The access token expires about an hour after login. If every call returns 401, run
jules loginagain. - The script uses undocumented endpoints. If a call starts returning 404 or 400, note which one rather than guessing at a fix.
- Seeing a few more sessions in the export than
jules remote list --sessionshows is expected.
Step 3: know what you got
Everything lands in ~/jules-export:
~/jules-export/
user-settings.json
env-variables.json
scheduled-tasks.json
sources.json # connected repositories
sessions.json
repos/<repo>/
setup.sh # environment setup script
test-command.txt
memories.json
memories.md
sessions/<id>/
session.json
activities.json # full activity log
summary.md # readable: prompt, plan, outputs
patch-1.diff ...
A repo folder only gets setup.sh and test-command.txt if a session recorded them, and only gets memories if it had any. An empty folder isn't necessarily a failed export.
Step 4: treat env-variables.json as a secret
This is the part I'd not skip. env-variables.json contains your environment variable values, not just names. Google says to keep the export folder private and out of your repositories.
What I do:
- Add
jules-export/to my global gitignore so it can't sneak into a commit. - Write down the variable names I need, then put the values into the new home (GitHub Actions secrets, a local
.envthat's ignored, your secret manager). - Rotate anything that's an actual credential. Those values sat with a third party and now sit on disk in plain text.
- Delete
env-variables.jsononce that's done.
Step 5: map each file to its new home
Claude Code reads CLAUDE.md in the repo; Codex reads AGENTS.md. Both are plain Markdown instructions, so the move is mostly copy and trim.
| Jules export | Where it goes |
|---|---|
repos/<repo>/setup.sh |
A "Setup" section in CLAUDE.md / AGENTS.md, and the install step of your CI workflow |
repos/<repo>/test-command.txt |
A "How to test" line in the same file, and the test step in CI |
repos/<repo>/memories.md |
Paste into CLAUDE.md / AGENTS.md, then cut anything stale |
env-variables.json |
Names into docs/CI, values into secrets (see step 4) |
scheduled-tasks.json |
A cron job or GitHub Actions schedule: trigger (below) |
sessions/<id>/patch-N.diff |
git apply if the work never got pushed |
sessions/<id>/summary.md |
Reference only. Useful when you forget why something was done |
A minimal AGENTS.md built from the export might be:
# Agent notes
## Setup
(paste setup.sh here)
## Tests
Run: (paste test-command.txt here)
## Things to remember
(trimmed memories.md)
Keep it short. A long, outdated memory list gets followed less well than ten lines that are true.
Scheduled tasks
Each Jules scheduled task is basically a prompt plus a schedule. Both replacements have a non-interactive mode: claude -p "<prompt>" for Claude Code, codex exec "<prompt>" for Codex. You can call either from a local cron, or from a GitHub Actions workflow with an on: schedule: cron trigger and the API key stored as a repository secret.
The exact JSON shape of scheduled-tasks.json isn't documented, so open it and read each task's prompt and schedule by hand. Then run each new job manually once before you trust it on a timer.
Unpushed patches
If a session produced code that never became a branch, the diff is still in the export:
cd your-repo
git checkout -b recover-jules-session
git apply ~/jules-export/sessions/<id>/patch-1.diff
Use git apply --check first if the repo has moved on since; old patches won't always apply cleanly.
Step 6: verify while you still can
Between November 11 and December 31 Jules is read-only, which is a good window to compare. Open a few sessions in the Jules UI next to their summary.md files, check the repo count in sources.json matches what you had connected, and make sure every scheduled task has a replacement. After December 31 there's nothing left to compare against.
Checklist
- [ ] Merge or close open Jules PRs
- [ ] Finish any sessions you need before Nov 11
- [ ]
npm install -g @google/julesandjules login - [ ] Confirm GitHub is connected (
jules remote list --repo) - [ ] Run the official export prompt from your home directory
- [ ] Keep
~/jules-exportout of git; move secrets, rotate credentials - [ ] Write
CLAUDE.md/AGENTS.mdper repo from setup, test command and memories - [ ] Rebuild scheduled tasks with
claude -porcodex exec - [ ]
git applyany unpushed patches - [ ] Spot-check the export against Jules before Dec 31
Disclosure: I made a small paid script that does step 5 automatically (CLAUDE.md, AGENTS.md and CI workflows per repo, plus a key-rotation list), $19 at https://mustafae.gumroad.com/l/zxjwzd. The manual steps above work fine without it.
來源:DEV Community · dev.to