2026-04-10 세션 핸드오프 v2 - 두 번째 재시작
2026-04-10 세션 핸드오프 v2
이 세션(첫 재시작 후)에서 해결한 것, 남은 것, 근본 원인들을 기록. 다음 세션은 이 문서 먼저 읽고 이어서 진행.
0. 해리의 새 운영 방침 (2026-04-10 18:10)
코덱스 5개 cmux 전담 체제로 전환 - cmux 세션 5개 추가로 띄워서 Codex에게 구현 전량 위임 - Claude(메인)는 기획/검토/검증/배분만 담당, 코드 직접 수정 금지 - 이유: Codex 사용량 여유 있음, Claude 컨텍스트 보존 - 새 세션 시작 시 이 체제부터 세팅할 것 (기존 6개 cmux + 신규 5개 Codex cmux) - 배분 시 이전 맥락 + 방법론 + 검증 절차까지 포함 (feedback_dispatch_with_context + feedback_cmux_dispatch_methodology)
1. 가장 먼저 할 것 (새 세션에서)
# 1) 전체 상태 스냅샷
cd ~/.openclaw/workspace && python3 shared/dispatch_tracker.py summary
launchctl list | grep -E "openclaw|hermes|sihwang"
curl -s localhost:4318/health
# 2) 6개 cmux 세션 상태
for s in 1 2 3 5; do echo "=== s$s ==="; cmux read-screen --surface surface:$s --lines 3; done
cmux read-screen --workspace workspace:2 --surface surface:6 --lines 3
cmux read-screen --workspace workspace:3 --surface surface:7 --lines 3
# 3) 섹터나침반 + /graphify 외부 상태 재확인
curl -sk -o /dev/null -w "graphify=%{http_code}\n" https://virtual-insanity.net/graphify/index.html
curl -sk "https://virtual-insanity.net/market/sector-compass?sector=shipbuilding" | grep -oE '(009540|010140|010620|042660|082740|097230|329180|439260)' | sort -u
2. 이 세션에서 해결된 것
| # | 작업 | 결과 |
|---|---|---|
| #54 | Hermes tailer 샘플링 (INFO 10%, getUpdates 1%) | ✅ 4.9/5, 부하 60→0건/10분 |
| #56/#60 | auto_dispatcher rate limit 20/h + dry-run | ✅ 검증 완료, activated (launchctl load) |
| #58 | OTel Phase 5 TRACEPARENT 전파 재수정 | ✅ 완료 |
| #59 | /tmp 정리 | ✅ 4.8/5 |
| #62 | Hermes 업그레이드 사전 점검 | ✅ 백업 49,684파일, 스냅샷 저장 |
| #63 | Phase 5 교차 검증 | ✅ 5.0/5 PASS |
| #64 | dispatch_tracker 동기화 시도 | ❌ 실패 (CLI 파악 실패) |
| #65 | 섹터나침반 shipbuilding 4건 미노출 | ✅ 완전 해결 — 8/8 전원 노출 확인 |
| #66 | Hermes 업그레이드 04:07 크론 예약 + 샘플링 3% | ✅ plist 등록, cross-verify PASS |
| #67 | /graphify 404 해결 | ✅ 완전 해결 — HTTP 200 |
| #72 | dispatch_tracker 재시도 동기화 | ✅ 전체 59 / 완료 58 / 실패 1 (#57 부분) |
| #73 | 이중 교차 검증 | ✅ (s2, 20분 sleep 후 검증) |
| #74 | Hermes 샘플링 실측 | ✅ 2건/10분 (예상 6건보다도 낮음) |
| #75 | Flask sector_compass.py 수정 | ✅ 반영 확인 |
| #76 | Flask graphify blueprint 추가 | ✅ 반영 확인 |
3. 남은 작업 (다음 세션에서 진행)
우선순위 높음
- #70 Graphify 패키지 버그 우회
- 증상:
ImportError: cannot import name 'score_all' from 'graphify.analyze' - 원인: /opt/homebrew/lib/python3.11/site-packages/graphify/analyze.py 에 score_all 함수 없음
- 시도 옵션:
pipx reinstall graphify혹은pip install --upgrade graphifyy--cluster-only모드로 기존 그래프 유지하며 재클러스터- graphify GitHub 소스에서 최신 버전 확인
-
최종 목표: graph.json의 edges > 0 복구, 대상을 ~/knowledge-agent 전체로 확장
-
#70-B 시스템 청사진 Knowledge Graph Live 섹션 추가
- 경로: ~/knowledge-agent/400-reports/260410_codex_system-blueprint-monitoring-update.md
- 내용: 노드/엣지 수, 마지막 갱신 시각, 라이브 링크
우선순위 중간
-
#57 섹터나침반 UI 부분 실패 정리 — tracker에 '실패 1' 남아있음. 실제로는 #75로 해결됐을 가능성 높음. status 재확인 후 completed 마킹.
-
Hermes tailer 샘플링 실측이 너무 낮음 — 예상 6건 vs 실측 2건. getUpdates 1%→3% 변경이 예상보다 강하게 줄었음. 2~5% 사이 최적값 재튜닝 여지.
-
sihwang-webapp 좀비 방지 — 이번에 포트 8080 좀비로 여러 번 재시작 실패. launchd plist에 KeepAlive/ThrottleInterval 재검토, 또는
launchctl unload → lsof 정리 → load루틴을 스크립트화.
예약
- Hermes v0.8 업그레이드 04:07 KST — s5 #66이 launchd plist 등록 완료 (
com.openclaw.hermes-upgrade-v08). 새벽에 자동 실행 예정. 실행 결과는 ~/knowledge-agent/400-reports/260410_hermes_upgrade-v08-result.md 에 저장되도록 설정.
4. 이 세션에서 얻은 핵심 교훈
A. mission-control ≠ 외부 서빙
- 잘못된 가정: virtual-insanity.net은 Next.js (mission-control) 가 서빙
- 실제: 외부 서빙은 Flask webapp (
~/.openclaw/workspace/scripts/pipeline/webapp/+com.openclaw.sihwang-webapp데몬) - mission-control은 Next.js 개발/내부용. public/graphify/ 파일을 Flask가 정적 서빙하도록 blueprint로 연결해야 함
- 적용: 앞으로 외부 웹 관련 이슈는 먼저
scripts/pipeline/webapp/blueprints/를 봐야 함
B. cmux send 엔터는 \n 필수
cmux send도구에--enter플래그는 존재하지 않음- 메시지 끝에
\n을 붙여야 실제 엔터 전송 --enter를 쓰면 문자열 그대로 입력창에 박힘- 이미 피드백 메모리로 저장됨:
feedback_cmux_enter_syntax.md
C. 긴 쉘 명령 나열은 Anthropic AUP 필터에 오탐
- 복잡한 sqlite3/launchctl/curl/grep/pipe 조합이 한 프롬프트에 들어가면 Claude Code가 Usage Policy refusal로 거부
- 해결: 배분 프롬프트는 자연어 목표 중심으로 짧게. 세부 명령은 세션이 알아서 작성하도록 맡김
D. 좀비 프로세스 / 포트 점유
- launchctl kickstart 해도 이전 인스턴스가 포트를 놓지 않으면 새 인스턴스 시작 실패
- exit code 1 + "Address already in use" 패턴
- 해결:
lsof -iTCP:8080 -sTCP:LISTEN -t | xargs kill -9후 재시작
E. 드리프트 카운터는 /clear로 안 줄어듦
/clear는 대화 내용만 지우고, 도구 호출 카운터는 Claude Code 프로세스 살아있는 한 계속 누적- 완전 리셋은 Claude Code 앱 재시작 필요
- 이번 세션은 800회 근접 후 이 문서 작성하며 마감
F. 3분 자동 감시 크론 구조
CronCreate durable=true패스해도 응답에 "Session-only"로 떠서 세션 한정- 실질적으로 세션 살아있는 동안만 감시 동작
- 영구 감시는 launchd나 시스템 cron 필요
5. 운영 상태 (마감 시점)
| 항목 | 상태 |
|---|---|
| auto_dispatcher | ✅ PID 89663, launchd, 10초 간격, rate limit 20/h, 큐 비어있음 |
| dispatch-watcher | ✅ PID 67592 |
| otel-collector | ✅ logs 34,600+ / spans 2,122 / 18.25MB |
| hermes-tailer | ✅ PID 52940, 3% 샘플링 적용 |
| hermes-gateway | ✅ PID 2578 (v0.6, 04:07 v0.8 업그레이드 예약) |
| sihwang-webapp | ✅ PID 19732 (재시작 후 정착, /graphify=200) |
| dispatch_tracker | ✅ 전체 59 / 완료 58 / 대기 0 / 실패 1 |
| 6개 cmux 세션 | 전부 Idle |
6. 중요 파일 경로
| 카테고리 | 경로 |
|---|---|
| Flask webapp 진입점 | ~/.openclaw/workspace/scripts/pipeline/webapp/__init__.py |
| sector_compass 블루프린트 | ~/.openclaw/workspace/scripts/pipeline/webapp/blueprints/sector_compass.py |
| graphify 블루프린트 (신규) | ~/.openclaw/workspace/scripts/pipeline/webapp/blueprints/graphify.py |
| moat_analysis latest.json | ~/.openclaw/workspace/memory/moat_analysis/latest.json |
| dispatch_tracker | ~/.openclaw/workspace/shared/dispatch_tracker.py |
| auto_dispatcher | ~/.openclaw/workspace/scripts/monitoring/auto_dispatcher.sh |
| Hermes 업그레이드 스크립트 | ~/.openclaw/workspace/scripts/maintenance/hermes_upgrade_v08.sh |
| Hermes 업그레이드 plist | ~/Library/LaunchAgents/com.openclaw.hermes-upgrade-v08.plist |
| 이전 핸드오프 (v1) | ~/knowledge-agent/400-reports/260410_claude_handoff.md |
| Phase 5 재검증 보고서 | ~/knowledge-agent/400-reports/260410_codex_phase5-verify-v2.md |
| Cross-verify 배치 보고서 | ~/knowledge-agent/400-reports/260410_codex_cross-verify-batch2.md |
| webapp 로그 | ~/.openclaw/logs/sihwang-webapp.log, sihwang-webapp-err.log |
7. 피해야 할 것
- mission-control (Next.js) 빌드/재배포로 외부 이슈 해결 시도 금지 → Flask webapp 쪽 수정해야 함
- 긴 쉘 명령 나열로 cmux 배분 프롬프트 작성 금지 → 자연어 목표로 짧게
- cmux send 후
--enter플래그 사용 금지 → 메시지 끝에\n - sihwang-webapp 재시작 시 좀비 확인 없이 kickstart 금지 →
lsof -iTCP:8080먼저 - 한 세션에 800회 이상 도구 호출 누적 금지 → 드리프트 심해지면 가비지 출력
8. 새 세션 시작 시 즉시 할 것
- 이 문서(
260410_claude_handoff-v2.md) 읽기 - 섹션 1의 상태 스냅샷 명령 실행
-
70 Graphify 패키지 버그 우회 작업 착수 (우선순위 1)
- Hermes v0.8 업그레이드가 04:07에 실행됐는지 확인 (
com.openclaw.hermes-upgrade-v08상태 + 결과 보고서) - dispatch_tracker에서 #57 상태 재확인 + 필요 시 completed 마킹