Three tested handoff routes from Grok Bot to local Codex put review at different steps
Overview
The author outlines video on the Grok Bot cloud computer and organizes assets and edits in local Codex. Three tested handoffs send tasks and results both ways: local execution, a private GitHub repo and one-way Syncthing sync. All settings and sample prompts are public.
Workflow
Trigger: The author makes outlines on Grok Bot’s cloud computer and organizes footage and edits with local Codex on a Mac. Three handoff routes were tested for sending tasks and returning results. The author made a comparison table and selection diagram for the post images and video and published all settings and prompts in a Gist. The Gist says the video’s prompts were spoken in Simplified Chinese and written out there in Traditional Chinese. Replace paths and repo names. The quoted prompts are examples.
- Bot: Route A uses local execution with one approval card at a time. On Grok Bot Settings → Computer, set this computer to Ask every time. Afterward restore Never allow and check Permissions for extra rules. Have the bot read cloud brief.md and make an asset folder and list in the designated Mac directory. Touch only that folder and report every command.
Meaning: Local execution is set to Ask every time. Use the cloud outline to create materials/section number/asset type under ~/Work/LocalOnly/relay-demo on the Mac and write materials.md. Do not read or write elsewhere.
我剛把這台電腦的本機執行打開了,設成每次詢問。 請按你雲端電腦上的 brief.md(這期影片的大綱),在我 Mac 的 ~/Work/LocalOnly/relay-demo 資料夾裡:按大綱建素材資料夾(materials/段號/素材類型),再寫一份 materials.md 列出每段要準備的素材。 只動 relay-demo 裡面的東西,別的地方不要讀也不要寫。做完告訴我你一共跑了哪些指令。
- Bot: Route B uses a private GitHub repo without touching the author’s computer. Three setup steps: ① create an empty private repo, relay-demo-tasks in the video. Grok creates tasks/, inputs/ and outputs/ on the first push. ② Make a fine-grained token for that repo only, with Contents read/write. Give it in Grok Bot’s secure secret card and keep it out of chat. ③ Clone it on the Mac. For the first demo round, tell Grok Bot:
Meaning: Don’t touch my computer. Push brief.md and a task file to the repo. Explain the work, permitted folder and definition of done.
這次換一種做法,你不碰我的電腦。 請把 brief.md 放進 relay-demo-tasks 倉庫的 inputs/demo-00/,再寫一份任務文件 tasks/demo-00.md,推上去。 任務:按大綱在 relay-demo 裡建素材資料夾、寫 materials.md;做完把 materials.md 複製一份到 outputs/demo-00/。 任務文件寫清楚:做什麼、只能動哪個資料夾、怎樣算做完。
For Codex started in relay-demo:
Meaning: Read the task and follow it. Copy results into outputs/ and leave commit and push to me.
讀 ../relay-demo-tasks/tasks/demo-00.md,照裡面的要求在目前的資料夾做完, 再把 materials.md 複製到 ../relay-demo-tasks/outputs/demo-00/。不要提交,也不要推送,我自己來。
The author checks and pushes locally. Stage a new file with git add before using git diff --staged:
git add outputs/demo-00/materials.md git diff --staged git commit -m "Add demo-00 materials checklist" git push
Back in Grok Bot:
Meaning: Results are in outputs/. Check the asset list against the outline.
outputs/demo-00/ 裡有結果了,幫我看看素材清單跟大綱對不對得上。
In an extended idea-bank case, Grok Bot and local Codex or Claude share an evolving Markdown file such as the idea list or project to-dos in a separate private repo. The root AGENTS.md has five rules. ① List canonical worktree paths on Mac and cloud, main as the primary branch and one active file. Share plain text only, with no credentials, media or binary blobs. Use git -C for all commands inside a larger project to avoid committing to its parent repo. Don’t sync .git/ with Syncthing. ② Check and pull first. Run git status --short to confirm clean, then git fetch origin and git merge --ff-only origin/main before reading or writing. Stop and report unexpected changes without overwrite or reset. ③ Commit actual edits only. No commit for reads. Use git diff to verify scope, git add with explicit paths and a commit message naming execution side and item number. No git add -A. Run git push origin main and report the short hash on success. ④ No force push or whole-file replacement. Preserve both sides and ask a person about content choices, priorities or conflicting facts. Sync on task, without waking the other side in the background or recording all chat. ⑤ For first Grok Bot connection, give the scoped token in a secure secret card. Ask for a read-only clone and AGENTS.md review with branch and worktree status. Save the path in long-term guidance only after verifying. First connection example:
Meaning: I created a separate private repo at the placeholder URL to maintain a file jointly in the cloud and via my local Codex. Use the secure secret card, verify it read-only first and report what you found.
我建了一個獨立私有倉庫 <你的倉庫網址>,用來讓你在雲端和我本機的 Codex 共同維護 <文件名稱>。 請透過安全密鑰卡片向我索取這個倉庫的 fine-grained 權杖(不要在對話裡貼出任何憑證)。 拿到權杖後,把倉庫 clone 到 /workspace/<你的目錄名>,讀取根目錄的 AGENTS.md, 並完成一次唯讀檢查:回報目前分支、遠端位址、最新提交與工作區狀態。 這次只做唯讀驗收,不要修改檔案,也不要建立提交。確認無誤後,請把這個工作副本入口與 AGENTS.md 的位置記到你的長期指引裡。
- Bot: Route C uses two one-way Syncthing folders without local execution or GitHub. Only Grok writes from-grok/ and only Mac writes to-grok/, so Grok cannot change Mac files. For cloud setup, obtain the Mac device ID from Syncthing, put it in item 6 and paste the whole prompt into cloud Grok Bot.
Meaning: Set up one-way Syncthing with my Mac. 1. Check architecture with uname -m and download the latest v2 Linux tar.gz from the official GitHub release. Check the matching sha256sum. 2. Install under /workspace/syncthing/bin, which is documented as persistent. Avoid apt and system directories because updates and resets remove installed software. 3. Use /workspace/syncthing/home with --home and keep it out of sync and backups. 4. Write ~/sync/start-syncthing.sh to do nothing if already running. 5. Limit UI and API to 127.0.0.1 and set credentials. 6. Add my-mac without auto-accept or introducer. 7. Share ~/sync/from-grok/ with ID grok-from as Send Only to my-mac. 8. Report version, SHA-256 verification, device ID and status.
請在你的雲端電腦上設定 Syncthing,用來和我的 Mac 單向同步檔案。要求如下,做完按最後一條回報。不要貼任何密鑰、API key、密碼或憑證內容。
- 用 uname -m 看架構,從官方 GitHub release(github.com/syncthing/syncthing/releases)下載最新 v2 的 linux 版 tar.gz,用同一個 release 裡的 sha256sum 檔案核對。核對不通過就停下來告訴我。
- 程式放到 /workspace/syncthing/bin/syncthing,/workspace 是官方寫明會保留的地方。不要用 apt,也不要放進 /usr 或其他系統目錄:Grok Bot 更新或重置電腦時,裝過的軟體會被刪掉。
- 設定目錄用 /workspace/syncthing/home/,啟動時用 --home 指定。這個目錄不要放進任何同步資料夾,也不要放進你的任何備份。
- 寫一個 ~/sync/start-syncthing.sh:用 /workspace/syncthing/bin/syncthing 的絕對路徑加 --home /workspace/syncthing/home,用一般使用者在背景執行;已經在跑就什麼都不做。
- 管理頁和 API 只監聽 127.0.0.1,設定管理頁的使用者名稱和密碼,密碼不要告訴我。
- 新增裝置:ID 是 <你的 Mac 裝置 ID>,名字叫 my-mac。不打開「自動接受資料夾」,不設成介紹人,不加其他裝置。
- 新建資料夾:路徑 ~/sync/from-grok/,ID 用 grok-from,類型「只傳送(Send Only)」,只共享給 my-mac。
- 回報:Syncthing 版本、sha256 核對結果、你這台的裝置 ID、grok-from 的狀態。
Install Syncthing for macOS. Put the cloud device ID in item 4 and paste to Codex or Claude Code.
Meaning: Set up one-way sync on this Mac and present changes for approval first. 1. Create ~/grok-sync/from-grok/ and ~/grok-sync/to-grok/. 2. Write from-grok/.stignore before sharing to ignore CLAUDE.md, AGENTS.md, .claude, .codex, .git, *.sh, *.py, *.js, *.command and *.app. 3. After starting, configure through local 127.0.0.1 and never display or save API key or UI password. 4. Add grok-vm without auto-accept or introducer. 5. Set from-grok/, ID grok-from, Receive Only, Staggered versioning for 30 days and ignore permissions. 6. Set to-grok/, ID grok-to, Send Only. 7. Keep global discovery and relays as set. 8. Report folder types, states and connections.
請在這台 Mac 上設定 Syncthing,用來和我的 Grok 雲端電腦單向同步檔案。先把要做的改動逐項列給我看,我確認後再做;做完按最後一條回報。
- 新建兩個資料夾:~/grok-sync/from-grok/ 和 ~/grok-sync/to-grok/。
- 先寫好 from-grok/.stignore,再加共享。內容:
(?i)CLAUDE.md (?i)AGENTS.md .claude .codex .git *.sh *.py *.js *.command *.app
- 啟動 Syncthing,透過本機 127.0.0.1 的介面改設定。API key 和管理頁密碼不要顯示出來,也不要寫進任何檔案。
- 新增裝置:ID 是 <雲端電腦的裝置 ID>,名字叫 grok-vm。不要打開「自動接受資料夾」,不要設成介紹人。
- 加資料夾 from-grok/:ID 用 grok-from,類型「只接收(Receive Only)」,只共享給 grok-vm;檔案版本用 Staggered,保留 30 天;打開「忽略權限」。
- 加資料夾 to-grok/:ID 用 grok-to,類型「只傳送(Send Only)」,只共享給 grok-vm。
- 全域設定(探索、中繼)不要改。
- 回報:兩個資料夾的類型和狀態、grok-vm 有沒有連上。
Tell Grok Bot to accept to-grok in ~/sync/to-grok/ as Receive Only and report status and whether my-mac is connected directly or by relay.
Meaning: Run the startup script, accept grok-to from the Mac at the specified path, use Receive Only and report folder and connection status.
先執行 ~/sync/start-syncthing.sh。Mac 已經把 grok-to 共享給你了,請接受它,路徑用 ~/sync/to-grok/,類型選「只接收(Receive Only)」。回報這個資料夾的狀態,以及和 my-mac 有沒有連上、是直連還是走 relay。
For the first run, tell Grok Bot:
Meaning: Without local execution or GitHub, run the startup script and use brief.md to write demo-00.md under ~/sync/from-grok/relay-demo/ and copy brief.md there. I’ll put materials.md in ~/sync/to-grok/relay-demo/ when done. Check that the Mac received the task and report at 100% sync.
這次換第三種做法,你不碰我的電腦,也不經過 GitHub。 請先執行 ~/sync/start-syncthing.sh。然後按 brief.md,在 ~/sync/from-grok/relay-demo/ 寫一份任務文件 demo-00.md,並把 brief.md 也複製一份進去。 任務:按大綱在 relay-demo 裡建素材資料夾、寫 materials.md。 做完的 materials.md 我會放到 ~/sync/to-grok/relay-demo/。 任務文件寫清楚:做什麼、只能動哪個資料夾、怎樣算做完。寫完查一下 Mac 收到沒有,到 100 再告訴我。
For Codex started in relay-demo:
Meaning: Read the synchronized task and do it without changing grok-sync. I’ll review and place materials.md myself.
讀 ~/grok-sync/from-grok/relay-demo/demo-00.md,照裡面的要求在目前的資料夾做完。 不要動 grok-sync 裡的任何東西,materials.md 我看過以後自己放過去。
After inspecting materials.md and dragging it into to-grok/relay-demo/, tell Grok Bot:
Meaning: The result is in ~/sync/to-grok/relay-demo/. Run ~/sync/start-syncthing.sh and wait for materials.md to arrive.
~/sync/to-grok/relay-demo/ 裡有結果了。請先執行 ~/sync/start-syncthing.sh,等 materials.md 送到(grok-to 到 100)再看,幫我看看素材清單跟大綱對不對得上。
Four connection checks: ① run ~/sync/start-syncthing.sh first, since Syncthing may have stopped during cloud sleep. ② Read local API /rest/system/connections and report connected, direct or relay. Two peers behind NAT often use relay, which the author says is normal. ③ Wait two minutes and check again, since old connections can take two or three minutes to drop. ④ If still disconnected, report connectionServiceStatus and lastDialStatus from /rest/system/status without the API key.
Check: In route A, the bot reports commands. Restore Never allow and confirm no new rules in Permissions. In B, check the diff before push. For new files use git add then git diff --staged. Commit and push after review. In the shared idea bank, a successful push plus the short hash counts as synced. Ask Grok Bot to compare the returned assets with the outline. In C, wait for both completion indicators to reach 100. Open and compare actual file content even then. The local API distinguishes direct and relay connections.
Key points and results
- The routes differ in who checks and where. A uses each approval card. B uses diff before pushing, or explicit author-set AI authorization for advanced shared use. C uses human review before placing output in to-grok/. The author calls detecting malicious content a bonus without guarantees.
- Avoid Always allow for local execution. A card says Grok Bot and all Bots, so it applies to every bot. Prompt injection can hide commands in data. Inspect the card, and ask for smaller steps before allowing a script you don’t understand. Auto Review is a model judgment without guarantees. Set each computer separately.
- Choose authorization boundaries per task. The demo used Codex Full access with prompt-scoped local work and author diff review, commit and push. The idea bank authorizes Git under common rules but people decide conflicts. The author distinguishes them.
- Stage new files to see the diff. git diff is empty for a new file until git add, then use git diff --staged.
- Scope the token to one repo and handle concurrent pushes. Fine-grained token with Contents read/write only. Simultaneous pushes can block. Pull and resolve conflicts without overwriting.
- Cloud updates and resets remove installed software. The author quotes settings that preserve files and logins but remove installed apps and packages. Install Syncthing in documented persistent /workspace without apt. /workspace was untested in the video. ~/sync/ survived one reset, but the docs do not promise home-directory retention (author's claim, not reproduced).
- Budget Syncthing maintenance. Sync is automatic but sometimes requires debugging both ends. Two NAT peers usually need a relay per the author. Both must be online. With Mac off, Grok output remains in cloud. Remove grok-vm from Mac Syncthing to stop.
- Mac .stignore enforces the one-way boundary. It applies on Mac only and Grok can’t change it. Mac doesn’t accept excluded writes. Codex had Full access and could write to to-grok/, so review depends on following the prompt rather than system enforcement.
- Folder sync has less history than Git. It keeps some old versions, with Staggered on Mac for 30 days. Git records each step.
- All three worked in author tests without comparative figures. Runs were not reproduced and the source gives no quantitative comparison.
- Keep authorization and review if automating further. For scheduled or more automated handoff, see agent-relay or write a script. Keep both boundaries. Local Claude Code follows the same principle.
Source
- Platform
- X
- Author
- Jason Zhang|QiQi Learns AI Studio
- Published
- Categories
- Content and writing, Getting started
What this evidence label means
Source read in full
We read the source (post, article or transcript). That only means the original was read. It does not mean this site reproduced the author's results.