Grok WorldGrok Build CLI field station

GROK BUILD CLI / 07

Session を安全に再開・圧縮・回復する

Grok は prompts、responses、tool calls、file snapshots を disk に保存します。継続性と同時に retention の責任も生まれます。

CHANNELSESSION 運用 / 中級 / 11 MIN
情報確認日2026-07-26
ORIGINOFFICIAL DOCS / PRIMARY

意図した thread を再開する

Sessions は working directory ごとに ~/.grok/sessions へ保存されます。再現性が必要なら明示 ID で resume し、現在 directory のタスクが明確な場合だけ最新 session を continue します。

--session-id は named headless session の作成であり、既存 session の resume ではありません。元 session を変えず新しい reasoning branch が必要なら --fork-session を使います。

grok --resume <session-id>
grok --resume
grok -c
grok sessions list

Context に管理される前に管理する

/context または /session-info で context window の圧力を確認します。/compact は history を圧縮し、残すべき facts、constraints、decisions の短い instruction を受け取れます。

Compaction は lossy summary boundary です。会話の寄り道より acceptance criteria、unresolved failures、current file state、verification commands を残します。

/context
/compact Preserve the accepted architecture, failing tests, and remaining verification steps.

データ損失モデルを理解して回復する

/rewind は選択 prompt snapshot へファイルを戻し、conversation を切り詰めます。公式ガイドは git に commit していない reverted changes が失われると警告するため、先に status と安全な checkpoint を確認します。

audit trail や handoff には Markdown transcript を export します。Session storage は prompt、tool output、snapshots を含み得るため、repository に合う retention と workstation access control を適用します。

  • /rewind 前に git status を確認する。
  • session history を安全な secret store と考えない。
  • team policy に従い session を削除または保管する。
/rewind
grok export <session-id> session.md