Skip to content

feat(continuity): 세션 압축 대체 핸드오프 — 손실 0·저토큰 복원 - #4

Merged
tak2-08 merged 1 commit into
mainfrom
agent/session-continuity
Aug 26, 2026
Merged

feat(continuity): 세션 압축 대체 핸드오프 — 손실 0·저토큰 복원#4
tak2-08 merged 1 commit into
mainfrom
agent/session-continuity

Conversation

@tak2-08

@tak2-08 tak2-08 commented Aug 26, 2026

Copy link
Copy Markdown
Owner

요약

세션 압축(compaction)을 대체: 작업 중 중요한 것은 즉시 entry로 저장되므로 압축할 원본이 채팅에만 존재하지 않음. 세션 종료 전 핸드오프 저장, 새 세션은 ~600 tok으로 이어서 일함. 서브에이전트·AI 배정 없이 메인 에이전트가 직접 검색 가능.

변경

  • tools/agent-handoff.mjs — save/load/list/current (핸드오프 번들 + CURRENT.md 포인터)
  • docs/session-continuity.md — 3단계 워크플로 + 순수 Grep 폴백 (Node 없이도 동작)
  • tools/benchmark-resume.mjs — 세션 복원 3방식 비교, BENCHMARK.md 섹션 추가
  • README 상단 실측 표 + Made by (Muse Spark 1.2 Agent) 갱신

벤치마크 (정직 공개)

scale full re-read compaction(est.) handoff C saving
5 445 tok 134 tok 760 tok -70.8% ❌ 소규모는 전체읽기가 저렴
50 20,525 tok 6,158 tok 3,460 tok 83.1%
500 191,825 tok 57,548 tok 3,460 tok 98.2% ✅ 손실 0

compaction 수치는 30%/40% 모델링 가정을 명시한 추정치.

Closes # —

- tools/agent-handoff.mjs: save/load/list/current
  - save → sessions/handoff/<date>--<session>.md (task/done/pointers/next) + agent-context/CURRENT.md 포인터 갱신
  - load → 새 세션 복원 브리프 (~280 tok), CURRENT.md 폴백
- docs/session-continuity.md: 압축 없이 이어가는 3단계 워크플로 (작업 중 즉시 entry 저장 → 종료 전 핸드오프 → 새 세션 ~600 tok 복원)
  - 메인 에이전트 직접 검색 보장: 모든 도구 단일 Bash 호출, 서브에이전트 스폰 없음
  - 순수 Grep/Read 폴백 (Node 없어도 동작): ^level: post-it → ^priority: [45] 순 계층 Grep
- tools/benchmark-resume.mjs + BENCHMARK.md 'Session resume' 섹션:
  - A full re-read vs B compaction(modeled, 30%/40% 가정 명시) vs C handoff
  - scale 500: A 191,825 tok → C 3,460 tok (98.2% 절약), 구조적 손실 0
  - 정직 공개: scale 5에서는 C가 A보다 비쌈 (-70.8%) — 소규모에서는 전체 읽기가 저렴, 계층은 50+부터 유리
- README: 상단 실측 벤치마크 표 추가 (검색 5/50/500 + 세션 복원), Made by 섹션 신설, Agent Model & Environment를 Author 중심으로 갱신
- skills 양쪽에 Session continuity 섹션 추가 (save/load/CURRENT.md/서브에이전트 불필요 명시)

검증: node --check 전체 통과, handoff save/load 실측 (280 tok), benchmark-resume 실측, validate ok, T2Editor 언급 0건
@tak2-08
tak2-08 merged commit d4370a4 into main Aug 26, 2026
1 check passed
@tak2-08
tak2-08 deleted the agent/session-continuity branch August 26, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant