{"definition_raw":"---\nid: rotate-luci-session\ntitle: Rotate Luci's main claude session daily \u2014 fresh context\nschedule: \"0 3 * * *\"\ntimeout: 60\nretry: false\nenabled: true\nnotify_on: failure\nrun_as: shell\ncommand: \"/home/lucienne/workspace/scripts/rotate-luci-session.sh\"\ntags: [infrastructure, maintenance, context]\nruntime_profile: claude_glm\n---\n\nDaily at 03:00 SAST.\n\nClaude Code's `--resume` re-hydrates the entire prior transcript, so pinning a session_id across days lets context grow unbounded. This task clears the pinned session_id and kills the claude process; the claude-persistent wrapper respawns without `--resume`, and Luci boots fresh from CLAUDE.md + memory/.\n\nImplemented 2026-04-17 after the two-day MC/Telegram incident where my session ran for 48+ hours on the same transcript. Fresh rotation keeps the context window usable.\n\nLogs to `~/workspace/logs/luci-session-rotation.log`. The last rotation timestamp is also written to a memory file so fresh Luci knows yesterday's session was intentionally rotated (not a crash).\n","id":"rotate-luci-session","last_run":{"duration_s":0.357553,"log_path":"/home/lucienne/workspace/logs/task-runs/rotate-luci-session/413314.log","output":"","started_at":"2026-06-13T03:00:37.138492+02:00","status":"completed"},"next_run":"2026-06-14 03:00","next_run_iso":"2026-06-14T03:00:00+02:00","runs":[{"duration_s":0.357553,"finished_at":"2026-06-13T03:00:37.498692+02:00","id":413314,"log_path":"/home/lucienne/workspace/logs/task-runs/rotate-luci-session/413314.log","output":"","started_at":"2026-06-13T03:00:37.138492+02:00","status":"completed","task_id":"rotate-luci-session","task_name":"Rotate Luci's main claude session daily \u2014 fresh context"},{"duration_s":0.338956,"finished_at":"2026-06-12T03:00:25.208043+02:00","id":409149,"log_path":"/home/lucienne/workspace/logs/task-runs/rotate-luci-session/409149.log","output":"","started_at":"2026-06-12T03:00:24.866631+02:00","status":"completed","task_id":"rotate-luci-session","task_name":"Rotate Luci's main claude session daily \u2014 fresh context"},{"duration_s":0.207596,"finished_at":"2026-06-11T03:01:23.732608+02:00","id":404781,"log_path":"/home/lucienne/workspace/logs/task-runs/rotate-luci-session/404781.log","output":"","started_at":"2026-06-11T03:01:23.522361+02:00","status":"completed","task_id":"rotate-luci-session","task_name":"Rotate Luci's main claude session daily \u2014 fresh context"},{"duration_s":0.193067,"finished_at":"2026-06-10T03:01:22.293262+02:00","id":400503,"log_path":"/home/lucienne/workspace/logs/task-runs/rotate-luci-session/400503.log","output":"","started_at":"2026-06-10T03:01:22.096234+02:00","status":"completed","task_id":"rotate-luci-session","task_name":"Rotate Luci's main claude session daily \u2014 fresh context"},{"duration_s":0.168883,"finished_at":"2026-06-09T03:01:20.995059+02:00","id":396265,"log_path":"/home/lucienne/workspace/logs/task-runs/rotate-luci-session/396265.log","output":"","started_at":"2026-06-09T03:01:20.823433+02:00","status":"completed","task_id":"rotate-luci-session","task_name":"Rotate Luci's main claude session daily \u2014 fresh context"},{"duration_s":0.205049,"finished_at":"2026-06-08T03:01:41.227633+02:00","id":392178,"log_path":"/home/lucienne/workspace/logs/task-runs/rotate-luci-session/392178.log","output":"","started_at":"2026-06-08T03:01:41.019751+02:00","status":"completed","task_id":"rotate-luci-session","task_name":"Rotate Luci's main claude session daily \u2014 fresh context"},{"duration_s":0.14648,"finished_at":"2026-06-07T03:01:06.698422+02:00","id":387750,"log_path":"/home/lucienne/workspace/logs/task-runs/rotate-luci-session/387750.log","output":"","started_at":"2026-06-07T03:01:06.549318+02:00","status":"completed","task_id":"rotate-luci-session","task_name":"Rotate Luci's main claude session daily \u2014 fresh context"},{"duration_s":0.151739,"finished_at":"2026-06-06T03:01:20.755346+02:00","id":383024,"log_path":"/home/lucienne/workspace/logs/task-runs/rotate-luci-session/383024.log","output":"","started_at":"2026-06-06T03:01:20.600604+02:00","status":"completed","task_id":"rotate-luci-session","task_name":"Rotate Luci's main claude session daily \u2014 fresh context"}],"runs_limit":20,"schedule":"0 3 * * *","schedule_label":{"description":"Daily at 03:00","is_custom":false,"label":"Daily","sort":4,"sort_time":"03:00"},"stats":{"avg_duration":0.221165375,"completed":8,"failed":0,"timeout":0,"total":8},"task":{"_description":"Daily at 03:00 SAST.\n\nClaude Code's `--resume` re-hydrates the entire prior transcript, so pinning a session_id across days lets context grow unbounded. This task clears the pinned session_id and kills the claude process; the claude-persistent wrapper respawns without `--resume`, and Luci boots fresh from CLAUDE.md + memory/.\n\nImplemented 2026-04-17 after the two-day MC/Telegram incident where my session ran for 48+ hours on the same transcript. Fresh rotation keeps the context window usable.\n\nLogs to `~/workspace/logs/luci-session-rotation.log`. The last rotation timestamp is also written to a memory file so fresh Luci knows yesterday's session was intentionally rotated (not a crash).","_file":"rotate-luci-session.md","_path":"/home/lucienne/workspace/tasks/rotate-luci-session.md","command":"/home/lucienne/workspace/scripts/rotate-luci-session.sh","enabled":true,"id":"rotate-luci-session","notify_on":"failure","retry":false,"run_as":"shell","runtime_profile":"claude_glm","schedule":"0 3 * * *","tags":["infrastructure","maintenance","context"],"timeout":60,"title":"Rotate Luci's main claude session daily \u2014 fresh context"}}
