본문으로 건너뛰기
Skillpedia
에이전트8.6k · #12398

session-compaction-and-restore

하는 일

이 스킬은 AI 에이전트가 맥락을 압축하거나 재시작하거나 새로 고칠 때도 유용한 작업 상태를 유지하는 방법을 설명합니다. 초기화 후에도 맥락이 끊기면 안 되는 장기 좌석을 운영하는 운영자와 에이전트를 위한 것입니다.

사용하는 경우

  • ✓좌석이 압축에 가까워졌거나 방금 압축되었을 때.
  • ✓진행 중인 작업을 위한 복원 패킷을 설계할 때.
  • ✓네이티브 재개, 포크, 산출물 재구축 중에서 선택해야 할 때.

스킬 링크

https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“기획자 좌석이 곧 압축됩니다. 파일 이름만이 아니라 제품 의도를 지키는 복원 패킷을 설계해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

복원 모드와 흔한 실패 유형을 설명해, 에이전트가 세부 사항뿐 아니라 제품 의도와 다음 단계도 보존하도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Session Compaction and Restore

Preserving useful working state across compaction, context loss, restart, or seat refresh. Includes Claude compaction restore, Codex resume/fork mechanics, transcript-based mental-model rebuilds, and durable handoff packets.

Long-lived seats are valuable only if they can survive context pressure. If compaction turns a senior seat into a cold-started agent, users will avoid persistent topologies and fall back to throwaway agents.

Use this when

  • A seat is approaching compaction or just compacted
  • Designing a high-fidelity restore packet for an active workflow
  • Distinguishing native runtime resume vs fork vs artifact-backed mental-model rebuild
  • Reasoning about what should be preserved vs reconstructable
  • Auditing a restore for product-intent preservation (not just detail preservation)

Don't use this when

  • The session is fresh and has no working state to preserve
  • The intent is to create a new seat from a primed source — that's session-source-fork or agent-starters
  • The packet is a one-off snapshot for human review — restore packets are for re-entering active work

The 5 distinctions (do not collapse)

Per the cross-runtime restore/reentry packet standard:

Mode What it means Outcome literal
Native resume Continue the same managed seat with native runtime token resumed
Fork New managed seat from prior native runtime conversation; new post-fork token forked
Rebuild Fresh-launch seeded with operator-declared artifacts in trust-precedence order rebuilt
Artifact-backed mental-model rebuild Restored seat derives understanding from a packet rather than native runtime continuity (case of rebuilt)
Fresh launch New agent without prior continuity fresh

These are load-bearing distinctions. Do NOT collapse fork into artifact-backed reentry; do NOT collapse rebuild into fork.

The three mechanisms — who owns each (verified vs main d37a08ad, 2026-07-21)

The outcomes above ride on three DISTINCT mechanisms; keep them separate:

  1. Claude built-in /compact — a Claude Code HARNESS feature, not OpenRig code. OpenRig only emits the literal /compact toward the pane after a prep turn; there is no compaction algorithm in the OpenRig repo. Provider-owned.
  2. OpenRig-managed restore — the enforcer + hook bridge: a precompact hook WRITES a restore packet; a bridge READER injects exactly ONE restore directive back via the harness hook channel (hookSpecificOutput.additionalContext), seat-isolated. The OpenRig-owned half.
  3. Codex session continuity — resume/rollout tokens (codex resume <token>), a separate path from the Claude mechanisms. Never conflate with Claude restore.

Safety boundary (ties to native-session-file-lab-boundary): no supported OpenRig path EDITS provider-owned native session / auth / transcript files to inject context. Context enters ONLY through sanctioned channels: the hook additionalContext, a normal user message via rig send, or Codex resume tokens. Precise nuance: OpenRig does write ~/.codex/config.toml — but only to install OpenRig activity hooks and [features], never session or auth state. So the rule is "never edits native session/auth/transcript files," NOT "never touches any provider-owned file."

Claude's own idle compaction while managed compaction is on

While policies.claude_compaction.enabled is true with a valid threshold (the enforcer treats any other threshold as off), every Claude session OpenRig launches (fresh, fork, resume and restore; ordinary, kernel, team-default and full-bypass seats) carries idleCompaction: false in its one --settings value. Claude Code then doesn't compact an idle session on its own, so managed seats compact through OpenRig's sequence (restore map, then /compact at the threshold).

  • Version boundary: Claude Code supports the key from 2.1.290. Earlier versions ignore it, so idle compaction stays possible there.
  • Precedence: it overrides a lower-precedence idleCompaction: true in user or project settings for those launches. Claude's managed settings still win.
  • Native threshold auto-compaction is untouched (autoCompactEnabled, DISABLE_AUTO_COMPACT). Where the enforcer has no fresh status-line usage sample for a seat, it doesn't compact that seat, and native auto-compaction is then the only compaction. Nothi
자주 묻는 질문

복원 패킷이란 무엇인가요?

초기화 후에도 핵심 맥락과 함께 에이전트가 진행 중인 작업으로 다시 들어갈 수 있게 하는 문서입니다.

네이티브 재개는 인계와 같은가요?

아닙니다. 스킬은 런타임 재개를 인계로 착각하면 안 된다고 설명합니다.

Codex도 다루나요?

네. Claude 압축 복원과 함께 Codex의 resume과 fork 방식도 다룹니다.

상세 정보

작성자의 원본 설명

Use when reasoning about what survives compaction/context-loss/restart/seat-refresh, designing a high-fidelity restore packet, or distinguishing native runtime resume vs fork vs artifact-backed mental-model rebuild. Covers the 4 failure modes that prevent honest restore (compacted seat drops hot potato; restore packet preserves details but loses product intent; runtime resume mistaken for handover or fork; rebuilt seat starts with stale instructions).

repo: mvschwarz/openrig

인기도

GitHub 스타
8.6k
순위
#12398
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬