Ctrl-b แล้ว d เพื่อ detach (ออกจาก session แต่ session ยังรันอยู่).
ปิด iTerm ได้โดย session ไม่ตาย.
git status · git log --oneline -10.claude/SYNC.mddocs/kb/README.mddocs/document_index.jsondocs/kb/data/changelog.jsonclaude --resumetmux ls · tmux attach -t claude_ttเริ่มจาก 0 · เครื่องเพิ่งเปิด · ยังไม่มี session อะไรอยู่.
Ctrl-b แล้ว d เพื่อ detach (ออกจาก session แต่ session ยังรันอยู่).
ปิด iTerm ได้โดย session ไม่ตาย.
เคยเปิด session claude_tt ไว้แล้ว · ต้องการกลับเข้ามา.
claude_tt ใช้คำสั่งย่อ tmux a ได้เลย · ไม่ต้องระบุ -t.
กรณีซับซ้อนที่สุด · ต้องสมมุติว่าอะไรก็ไม่เหลือใน memory · ต้องอ่าน repo + SYNC + changelog ก่อนลงมือ.
git log + SYNC.md แทน.
claude --resume คืน context conversation แค่บางส่วน · ถ้างานค้างกลาง operation (เช่น แก้ไฟล์ แต่ยังไม่ commit) ให้ตรวจจาก git status ก่อน.
ทั้งหมดนี้เป็น source of truth · อย่าคาดเดาจาก terminal memory เพียงอย่างเดียว.
| File | Owner | Why read | Quick command |
|---|---|---|---|
| .claude/SYNC.md | A + B (shared) | Cross-session handoff · what each session did last · notes to the other session | tail -80 .claude/SYNC.md |
| docs/kb/README.md | B-owned | Orientation for KB structure · routes · categories · dev conventions | head -80 docs/kb/README.md |
| docs/document_index.json | B-owned | All registered docs · canonical refs · route maps · phase linkage | python3 -c "import json; d=json.load(open('docs/document_index.json')); print(d.get('updated_at'))" |
| docs/kb/data/changelog.json | B-owned | Detailed phase-by-phase log · latest_phase · entries · files_updated |
python3 -c "import json; d=json.load(open('docs/kb/data/changelog.json')); print(d['latest_phase'])" |
| git log / git status | Repo state | Actual code state · uncommitted changes · commit history · untracked files | git status; git log --oneline -10 |
.claude/SYNC.md after every meaningful change. ทุก commit ที่เปลี่ยน structure ต้องมี SYNC entry · ทีมข้าม session ต้องตามได้--resume is best-effort. ถ้า conversation ยาวมาก · อาจไม่คืนครบ · ตรวจ git log + SYNC ประกอบdocs/kb/* (B-owned) · B ห้ามแก้ docs/*.html non-KB · per CLAUDE.md Multi-Session Protocolclaude --resume ไม่ใช่ full session restore. Claude คืน conversation context ล่าสุดเท่าที่ข้อมูลยังอยู่ · ไม่คืน pending edits · ไม่คืน untracked files · ไม่คืน in-flight tool calls.
git status · git log · .claude/SYNC.md · B's changelog.json.
ทั้งหมดนี้คือสิ่งเดียวที่ยืนยันได้ว่างานทำถึงไหน · ไม่ใช่ memory ของ terminal หรือของ Claude.
claude_tt มีอยู่If tmux session existstmux attach -t claude_tt · เข้า session เดิมได้ทันที · ถ้า Claude ยังรันให้ใช้ต่อ · ถ้าหลุด รัน claude --resumetmux new -s claude_tt แล้วรัน claude --resume · งานที่ผ่านมากู้จาก git log + SYNC.mdgit status · git diff เพื่อดู · ตัดสินใจ commit (ถ้าเสร็จ) หรือ git stash (ถ้ายังไม่พร้อม) · อย่าทิ้งไว้ยาว.claude/SYNC.md (Session A head) · git log --oneline -10 · แล้วสั่ง Claude "อ่าน SYNC แล้วสรุปว่าทำถึงไหน"cd repo → git pull → git status → tail SYNC.md → tmux attach หรือ new → claude --resume → สั่งให้ Claude อ่าน SYNC อีกครั้งก่อนลงมือgit pull --ff-only · ถ้า conflict ให้ stop และดู SYNC · ห้ามแก้ไฟล์ B-owned · ถ้าจำเป็นต้อง coord ให้เขียน REQ ใน SYNC.mdgit stash list · อาจเคย stash ไว้git status · git log --oneline -10tail -80 .claude/SYNC.mdถ้าต้องเลือกอ่านแค่ 2 ไฟล์ · อ่าน git log + SYNC.md ก่อน. อย่างอื่นรออ่านทีหลังได้.