[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F5VHAZ1998MGH3BWKS243X":3,"skill-same:01M7F5VHAZ1998MGH3BWKS243X":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":14,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M7F5VHAZ1998MGH3BWKS243X","hermes-context-lifecycle-diagnostics",null,"Use when Hermes context compression or resume fails.","chaorenex1\u002Fhermes-home-content","chaorenex1","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F23194925?v=4","01M7F5NA1D1D02R2MEMYQN2NZT","chan chan","01M7F5NA20KTHMTY2015CYM1TZ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002F.archive\u002Fhermes-context-lifecycle-diagnostics\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\r\nname: hermes-context-lifecycle-diagnostics\r\ndescription: \"Use when Hermes context compression or resume fails.\"\r\nversion: 1.0.0\r\nauthor: Hermes Agent\r\nlicense: MIT\r\nplatforms: [linux, macos, windows]\r\nmetadata:\r\n  hermes:\r\n    tags: [hermes, context, compression, compaction, sessions, gateway, debugging]\r\n    related_skills: [hermes-agent, hermes-interaction-debugging, systematic-debugging, privacy-safe-observability]\r\n---\r\n\r\n# Hermes Context Lifecycle Diagnostics\r\n\r\n## Overview\r\n\r\nDiagnose Hermes context-window failures without collapsing several independent systems into one verdict. A configured compressor, a reachable summary model, a correct message transform, and a successful live session rotation are separate claims and require separate evidence.\r\n\r\nThe core distinction is:\r\n\r\n```text\r\ntrigger policy → summary backend → compaction transform → lease\u002Frotation → durable transcript → next provider request\r\n```\r\n\r\nA green unit test or successful auxiliary-model call proves only its own layer. A live Desktop\u002FGateway session can still fail because its in-memory snapshot, durable transcript, context limit, or owning process differs from the tested path.\r\n\r\n## When to Use\r\n\r\nUse this skill when:\r\n\r\n- `\u002Fcompress` or `\u002Fcompact` appears ineffective;\r\n- automatic compression does not fire before provider overflow;\r\n- a session repeatedly reports context length exceeded;\r\n- compressed context is missing after resume;\r\n- Desktop\u002FGateway behavior disagrees with a direct CLI or source-level probe;\r\n- compression locks, lineage, active\u002Fcompacted rows, or summary fallbacks need inspection;\r\n- a user asks for a health check of Hermes compression or context lifecycle.\r\n\r\nDo not use this skill for generic provider authentication setup without a context symptom; use `hermes-agent` provider troubleshooting instead. Do not edit source or config during a check unless the user also requested a repair.\r\n\r\n## Health Layers\r\n\r\nTreat each layer as an independent claim.\r\n\r\n| Layer | Question | Sufficient evidence |\r\n|---|---|---|\r\n| Trigger policy | Should compression fire before the real provider ceiling? | Resolved context budget, threshold, absolute cap, output reservation, observed provider limit |\r\n| Summary backend | Can the configured auxiliary model return usable content now? | One minimal real call through the compression task route |\r\n| Transform | Does compaction shrink a transcript while preserving invariants? | Synthetic end-to-end `ContextCompressor.compress()` probe |\r\n| Orchestration | Can the owning runtime acquire the session lease and publish a boundary? | Correlated live log + lock\u002Flineage state |\r\n| Persistence | Is the child\u002Fin-place transcript durable and resumable? | Active\u002Fcompacted counts, child lineage, readback after rotation |\r\n| Provider continuation | Does the next request fit and complete? | One post-compaction provider response with real usage |\r\n| Surface | Does the user see the correct session\u002Fstatus? | Owning Desktop\u002FTUI\u002FGateway state, not a different process |\r\n\r\nNever report “compression works” from only one row of this table.\r\n\r\n## Evidence-First Workflow\r\n\r\n### 1. Bind the Scope\r\n\r\nIdentify the active Hermes home\u002Fprofile, session ID, platform, model\u002Fprovider, and process that owns the interaction. Record whether the check targets CLI, TUI, Desktop, or Gateway.\r\n\r\nCompletion criterion: every later log row, database row, and runtime probe can be attributed to the same scope. If scope is unknown, report that limitation instead of mixing evidence from different sessions.\r\n\r\n### 2. Read the Effective Compression Contract\r\n\r\nUse `hermes config get` for behavioral settings; do not hand-edit `config.yaml` while diagnosing.\r\n\r\nInspect at least:\r\n\r\n- `compression.enabled`\r\n- `compression.threshold`\r\n- `compression.threshold_tokens`\r\n- `compression.target_ratio`\r\n- `compression.abort_on_summary_failure`\r\n- `auxiliary.compression.provider`\r\n- `auxiliary.compression.model`\r\n- `model.context_length`\r\n- any effective output-token reservation exposed by the running Agent\r\n\r\nCompute the nominal trigger only after accounting for output reservation and any absolute threshold cap. Compare it with the **observed provider ceiling**, not the marketing\u002Fmodel-name ceiling.\r\n\r\nCompletion criterion: state whether the configured trigger is safely below, near, or above the provider limit. If the provider error does not disclose a limit, do not invent one; report the highest observed failing prompt and recommend a conservative bounded probe or explicit cap.\r\n\r\n### 3. Probe the Summary Backend\r\n\r\nMake one minimal real call through the `compression` auxiliary task route. Verify provider\u002Fmodel, stop reason, and non-empty content. Do not print credentials, request headers, raw provider payloads, or private transcript text.\r\n\r\nA successful call proves routing and current reachability. It does not prove summary quality, transcript transformation, or persistence.\r\n\r\nCompletion criterion: record `provider\u002Fmodel`, success\u002Ffailure class, and whether usable content was returned.\r\n\r\n### 4. Exercise the Transform\r\n\r\nRun a synthetic transcript through the real `ContextCompressor.compress()` path with:\r\n\r\n- enough messages\u002Ftokens to create a compressible middle;\r\n- a small test context budget;\r\n- the configured summary task\u002Fmodel;\r\n- `force=True` so the probe is independent of automatic-trigger timing;\r\n- no real user transcript content.\r\n\r\nVerify:\r\n\r\n- before\u002Fafter message and estimated-token counts;\r\n- exactly one current compressed-summary handoff when expected;\r\n- compressed-summary metadata is present;\r\n- role alternation remains provider-valid;\r\n- `compression_count` increments;\r\n- `aborted`, fallback, and error fields are clean;\r\n- no secrets or user content were included in the fixture.\r\n\r\nCompletion criterion: the transform shrinks materially and all invariants pass, or the exact failing layer is identified.\r\n\r\n### 5. Run Bounded Regression Tests\r\n\r\nPrefer focused tests that cover manual compression, metadata, focus handling, preflight gates, memory-context handoff, lineage, and lock-skip behavior. A broad `-k compress` sweep can be expensive and may include unrelated meanings of “compressed.”\r\n\r\nIf a broad run times out, do not count it as passed or failed. Record the timeout and run a smaller named subset to completion. Test logs may intentionally emit synthetic quota\u002Fauth\u002Fnetwork warnings; correlate test session IDs and timestamps before treating warnings as production incidents.\r\n\r\nCompletion criterion: at least one named, relevant subset completes with a clear pass\u002Ffail result.\r\n\r\n### 6. Inspect Live Lifecycle and Durable State\r\n\r\nRead only metadata needed for diagnosis:\r\n\r\n- session source, parent, start\u002Fend state, and message count;\r\n- active vs compacted\u002Finactive message counts;\r\n- compression failure\u002Fcooldown\u002Fanti-thrash fields;\r\n- compression lock count\u002Fholder metadata;\r\n- parent\u002Fchild lineage and whether a live child is uniquely adoptable;\r\n- correlated log events for overflow, lease abort, rotation, fallback, and post-compression usage.\r\n\r\nDo not query or print message bodies unless the user explicitly needs content-level analysis and privacy permits it.\r\n\r\nInterpret common shapes:\r\n\r\n- **Summary probe passes; transform passes; live session fails** → orchestration, persistence, runtime skew, or stale snapshot.\r\n- **Provider overflows below nominal trigger** → effective context contract is wrong or the threshold is too late.\r\n- **“Changed before lease acquisition”** → fail-closed data-loss protection fired. This is not a successful compression; determine why the caller snapshot was stale and whether the next attempt reloads durable messages.\r\n- **Durable-length abort is silent to callers.** The pre-lease length abort in `compress_context` (`agent\u002Fconversation_compression.py`, `durable_parent` length check) returns the input list object WITHOUT setting `_compression_skipped_due_to_lock` and without emitting attempt telemetry. Every caller distinguishes lock-skip via `compression_skipped_due_to_lock(agent)`; a durable-length abort therefore falls into the generic no-op branch: preflight arms the insufficient-progress blocker, and the overflow\u002F413 handlers conclude “Cannot compress further” → `compression_exhausted` → possible gateway auto-reset. If the caller never reloads its in-memory snapshot from the DB, the same abort can re-fire every attempt — a non-progressing safe abort. Audit shape and recovery contract: `references\u002Fdurable-length-abort-audit.md`.\r\n- **No lock exists now** → only proves no current holder. It does not disprove an earlier race.\r\n- **Active rows remain high; no compacted rows\u002Fchild boundary** → compression did not commit.\r\n- **Compaction committed; next real prompt remains over threshold** → incompressible system\u002Ftool overhead or ineffective summary; inspect real usage and anti-thrash state.\r\n\r\nCompletion criterion: identify the first layer where evidence changes from healthy to unhealthy.\r\n\r\n### 7. Separate Verdict from Repair\r\n\r\nFor a check-only request, stop after the health matrix and do not silently change thresholds, restart processes, or rotate sessions.\r\n\r\nFor a repair request, use the smallest reversible intervention:\r\n\r\n1. Correct the effective context\u002Ftrigger contract when it is demonstrably late.\r\n2. Repair stale-snapshot reload\u002Fmerge or owning-process skew when live rotation is the failing layer.\r\n3. Preserve fail-closed behavior; never bypass lease drift by publishing an older snapshot.\r\n4. Verify one real post-compaction provider response and durable resume.\r\n\r\nCompletion criterion: every claimed healthy layer has direct evidence, and every remaining risk is explicit.\r\n\r\n## Trigger-Safety Rule\r\n\r\nThe safe trigger must leave room for:\r\n\r\n```text\r\nsystem prompt + tool schemas + preserved tail + summary handoff + requested output + provider variance\r\n```\r\n\r\nTherefore `threshold = advertised_context × ratio` is not sufficient by itself. Prefer an explicit `compression.threshold_tokens` when a custom gateway exposes a smaller or variable ceiling than the model metadata. Do not choose an exact cap from a single truncated error; establish a supported provider limit or use a conservative value with a post-change probe.\r\n\r\n## Reporting Contract\r\n\r\nLead with one of:\r\n\r\n- **Healthy** — every required layer passed, including a live post-compaction request;\r\n- **Partially healthy** — core transform works but one live lifecycle layer fails;\r\n- **Unhealthy** — summary\u002Ftransform cannot produce a safe handoff;\r\n- **Inconclusive** — missing scope or evidence prevents attribution.\r\n\r\nThen provide a compact matrix with evidence and blockers. Distinguish tests from live production\u002Fsession evidence. State whether any source, config, session, or process was modified.\r\n\r\nFor a reusable probe recipe and privacy-safe SQL\u002Flog checks, load `references\u002Fcompression-health-check.md`.\r\n\r\n## Common Pitfalls\r\n\r\n1. **Config-only success.** `compression.enabled=true` proves no runtime behavior.\r\n2. **Aux-only success.** A summary model returning `OK` does not prove compaction or rotation.\r\n3. **Synthetic-only success.** A direct compressor probe bypasses lease, persistence, and frontend ownership.\r\n4. **Mirrored-log overcounting.** The same event may appear in error and stdio logs; count an authoritative stream or deduplicate by timestamp\u002Fsession\u002Fmessage.\r\n5. **Test-warning confusion.** Failure-path tests deliberately log fake auth, quota, timeout, and malformed-response errors. Exclude the test run’s session\u002Ftime window before diagnosing production.\r\n6. **Late nominal threshold.** A large configured context window can defer compression beyond a custom gateway’s real ceiling.\r\n7. **Unsafe race “fix.”** Removing the durable-length guard can lose newer messages. Reload or reconcile; never publish the stale snapshot.\r\n8. **No-op ambiguity.** `compress_context` returns the input list object for lock-skip, durable-length abort, breaker\u002Fcooldown, empty-transcript refusal, and engine no-op. Only lock-skip sets `_compression_skipped_due_to_lock`; only a real compaction returns a different object. When auditing a no-op, check which abort path fired (log line + flag state) before concluding compression is broken.\r\n9. **Lock-state overclaim.** Zero current locks does not explain earlier lease contention or snapshot drift.\r\n10. **Private evidence leakage.** Report counts, states, and bounded error classes—not message bodies, credentials, endpoints, or raw payloads.\r\n11. **Timeout mislabeling.** A timed-out broad suite is incomplete, not green or red; run a bounded subset to completion.\r\n\r\n## Verification Checklist\r\n\r\n- [ ] Active profile\u002Fsession\u002Fplatform\u002Fprocess scope is fixed.\r\n- [ ] Effective trigger policy is compared with observed provider behavior.\r\n- [ ] Compression auxiliary route returns usable content or a classified failure.\r\n- [ ] Synthetic transform verifies shrinkage, metadata, alternation, and no fallback.\r\n- [ ] A focused regression subset completes.\r\n- [ ] Live logs are separated from test-generated warnings.\r\n- [ ] Durable active\u002Fcompacted rows, locks, and lineage are checked without message bodies.\r\n- [ ] The first unhealthy lifecycle layer is identified.\r\n- [ ] Verdict distinguishes core health from live-session health.\r\n- [ ] The report states whether anything was modified.\r\n","# Hermes Context Lifecycle Diagnostics\r\n\r\n## Overview\r\n\r\nDiagnose Hermes context-window failures without collapsing several independent systems into one verdict. A configured compressor, a reachable summary model, a correct message transform, and a successful live session rotation are separate claims and require separate evidence.\r\n\r\nThe core distinction is:\r\n\r\n```text\r\ntrigger policy → summary backend → compaction transform → lease\u002Frotation → durable transcript → next provider request\r\n```\r\n\r\nA green unit test or successful auxiliary-model call proves only its own layer. A live Desktop\u002FGateway session can still fail because its in-memory snapshot, durable transcript, context limit, or owning process differs from the tested path.\r\n\r\n## When to Use\r\n\r\nUse this skill when:\r\n\r\n- `\u002Fcompress` or `\u002Fcompact` appears ineffective;\r\n- automatic compression does not fire before provider overflow;\r\n- a session repeatedly reports context length exceeded;\r\n- compressed context is missing after resume;\r\n- Desktop\u002FGateway behavior disagrees with a direct CLI or source-level probe;\r\n- compression locks, lineage, active\u002Fcompacted rows, or summary fallbacks need inspection;\r\n- a user asks for a health check of Hermes compression or context lifecycle.\r\n\r\nDo not use this skill for generic provider authentication setup without a context symptom; use `hermes-agent` provider troubleshooting instead. Do not edit source or config during a check unless the user also requested a repair.\r\n\r\n## Health Layers\r\n\r\nTreat each layer as an independent claim.\r\n\r\n| Layer | Question | Sufficient evidence |\r\n|---|---|---|\r\n| Trigger policy | Should compression fire before the real provider ceiling? | Resolved context budget, threshold, absolute cap, output reservation, observed provider limit |\r\n| Summary backend | Can the configured auxiliary model return usable content now? | One minimal real call through the compression task route |\r\n| Transform | Does compaction shrink a transcript while preserving invariants? | Synthetic end-to-end `ContextCompressor.compress()` probe |\r\n| Orchestration | Can the owning runtime acquire the session lease and publish a boundary? | Correlated live log + lock\u002Flineage state |\r\n| Persistence | Is the child\u002Fin-place transcript durable and resumable? | Active\u002Fcompacted counts, child lineage, readback after rotation |\r\n| Provider continuation | Does the next request fit and complete? | One post-compaction provider response with real usage |\r\n| Surface | Does the user see the correct session\u002Fstatus? | Owning Desktop\u002FTUI\u002FGateway state, not a different process |\r\n\r\nNever report “compression works” from only one row of this table.\r\n\r\n## Evidence-First Workflow\r\n\r\n### 1. Bind the Scope\r\n\r\nIdentify the active Hermes home\u002Fprofile, session ID, platform, model\u002Fprovider, and process that owns the interaction. Record whether the check targets CLI, TUI, Desktop, or Gateway.\r\n\r\nCompletion criterion: every later log row, database row, and runtime probe can be attributed to the same scope. If scope is unknown, report that limitation instead of mixing evidence from different sessions.\r\n\r\n### 2. Read the Effective Compression Contract\r\n\r\nUse `hermes config get` for behavioral settings; do not hand-edit `config.yaml` while diagnosing.\r\n\r\nInspect at least:\r\n\r\n- `compression.enabled`\r\n- `compression.threshold`\r\n- `compression.threshold_tokens`\r\n- `compression.target_ratio`\r\n- `compression.abort_on_summary_failure`\r\n- `auxiliary.compression.provider`\r\n- `auxiliary.compression.model`\r\n- `model.context_length`\r\n- any effective output-token reservation exposed by the running Agent\r\n\r\nCompute the nominal trigger only after accounting for output reservation and any absolute threshold cap. Compare it with the **observed provider ceiling**, not the marketing\u002Fmodel-name ceiling.\r\n\r\nCompletion criterion: state whether the configured trigger is safely below, near, or above the provider limit. If the provider error does not disclose a limit, do not invent one; report the highest observed failing prompt and recommend a conservative bounded probe or explicit cap.\r\n\r\n### 3. Probe the Summary Backend\r\n\r\nMake one minimal real call through the `compression` auxiliary task route. Verify provider\u002Fmodel, stop reason, and non-empty content. Do not print credentials, request headers, raw provider payloads, or private transcript text.\r\n\r\nA successful call proves routing and current reachability. It does not prove summary quality, transcript transformation, or persistence.\r\n\r\nCompletion criterion: record `provider\u002Fmodel`, success\u002Ffailure class, and whether usable content was returned.\r\n\r\n### 4. Exercise the Transform\r\n\r\nRun a synthetic transcript through the real `ContextCompressor.compress()` path with:\r\n\r\n- enough messages\u002Ftokens to create a compressible middle;\r\n- a small test context budget;\r\n- the configured summary task\u002Fmodel;\r\n- `force=True` so the probe is independent of automatic-trigger timing;\r\n- no real user transcript content.\r\n\r\nVerify:\r\n\r\n- before\u002Fafter message and estimated-token counts;\r\n- exactly one current compressed-summary handoff when expected;\r\n- compressed-summary metadata is present;\r\n- role alternation remains provider-valid;\r\n- `compression_count` increments;\r\n- `aborted`, fallback, and error fields are clean;\r\n- no secrets or user content were included in the fixture.\r\n\r\nCompletion criterion: the transform shrinks materially and all invariants pass, or the exact failing layer is identified.\r\n\r\n### 5. Run Bounded Regression Tests\r\n\r\nPrefer focused tests that cover manual compression, metadata, focus handling, preflight gates, memory-context handoff, lineage, and lock-skip behavior. A broad `-k compress` sweep can be expensive and may include unrelated meanings of “compressed.”\r\n\r\nIf a broad run times out, do not count it as passed or failed. Record the timeout and run a smaller named subset to completion. Test logs may intentionally emit synthetic quota\u002Fauth\u002Fnetwork warnings; correlate test session IDs and timestamps before treating warnings as production incidents.\r\n\r\nCompletion criterion: at least one named, relevant subset completes with a clear pass\u002Ffail result.\r\n\r\n### 6. Inspect Live Lifecycle and Durable State\r\n\r\nRead only metadata needed for diagnosis:\r\n\r\n- session source, parent, start\u002Fend state, and message count;\r\n- active vs compacted\u002Finactive message counts;\r\n- compression failure\u002Fcooldown\u002Fanti-thrash fields;\r\n- compression lock count\u002Fholder metadata;\r\n- parent\u002Fchild lineage and whether a live child is uniquely adoptable;\r\n- correlated log events for overflow, lease abort, rotation, fallback, and post-compression usage.\r\n\r\nDo not query or print message bodies unless the user explicitly needs content-level analysis and privacy permits it.\r\n\r\nInterpret common shapes:\r\n\r\n- **Summary probe passes; transform passes; live session fails** → orchestration, persistence, runtime skew, or stale snapshot.\r\n- **Provider overflows below nominal trigger** → effective context contract is wrong or the threshold is too late.\r\n- **“Changed before lease acquisition”** → fail-closed data-loss protection fired. This is not a successful compression; determine why the caller snapshot was stale and whether the next attempt reloads durable messages.\r\n- **Durable-length abort is silent to callers.** The pre-lease length abort in `compress_context` (`agent\u002Fconversation_compression.py`, `durable_parent` length check) returns the input list object WITHOUT setting `_compression_skipped_due_to_lock` and without emitting attempt telemetry. Every caller distinguishes lock-skip via `compression_skipped_due_to_lock(agent)`; a durable-length abort therefore falls into the generic no-op branch: preflight arms the insufficient-progress blocker, and the overflow\u002F413 handlers conclude “Cannot compress further” → `compression_exhausted` → possible gateway auto-reset. If the caller never reloads its in-memory snapshot from the DB, the same abort can re-fire every attempt — a non-progressing safe abort. Audit shape and recovery contract: `references\u002Fdurable-length-abort-audit.md`.\r\n- **No lock exists now** → only proves no current holder. It does not disprove an earlier race.\r\n- **Active rows remain high; no compacted rows\u002Fchild boundary** → compression did not commit.\r\n- **Compaction committed; next real prompt remains over threshold** → incompressible system\u002Ftool overhead or ineffective summary; inspect real usage and anti-thrash state.\r\n\r\nCompletion criterion: identify the first layer where evidence changes from healthy to unhealthy.\r\n\r\n### 7. Separate Verdict from Repair\r\n\r\nFor a check-only request, stop after the health matrix and do not silently change thresholds, restart processes, or rotate sessions.\r\n\r\nFor a repair request, use the smallest reversible intervention:\r\n\r\n1. Correct the effective context\u002Ftrigger contract when it is demonstrably late.\r\n2. Repair stale-snapshot reload\u002Fmerge or owning-process skew when live rotation is the failing layer.\r\n3. Preserve fail-closed behavior; never bypass lease drift by publishing an older snapshot.\r\n4. Verify one real post-compaction provider response and durable resume.\r\n\r\nCompletion criterion: every claimed healthy layer has direct evidence, and every remaining risk is explicit.\r\n\r\n## Trigger-Safety Rule\r\n\r\nThe safe trigger must leave room for:\r\n\r\n```text\r\nsystem prompt + tool schemas + preserved tail + summary handoff + requested output + provider variance\r\n```\r\n\r\nTherefore `threshold = advertised_context × ratio` is not sufficient by itself. Prefer an explicit `compression.threshold_tokens` when a custom gateway exposes a smaller or variable ceiling than the model metadata. Do not choose an exact cap from a single truncated error; establish a supported provider limit or use a conservative value with a post-change probe.\r\n\r\n## Reporting Contract\r\n\r\nLead with one of:\r\n\r\n- **Healthy** — every required layer passed, including a live post-compaction request;\r\n- **Partially healthy** — core transform works but one live lifecycle layer fails;\r\n- **Unhealthy** — summary\u002Ftransform cannot produce a safe handoff;\r\n- **Inconclusive** — missing scope or evidence prevents attribution.\r\n\r\nThen provide a compact matrix with evidence and blockers. Distinguish tests from live production\u002Fsession evidence. State whether any source, config, session, or process was modified.\r\n\r\nFor a reusable probe recipe and privacy-safe SQL\u002Flog checks, load `references\u002Fcompression-health-check.md`.\r\n\r\n## Common Pitfalls\r\n\r\n1. **Config-only success.** `compression.enabled=true` proves no runtime behavior.\r\n2. **Aux-only success.** A summary model returning `OK` does not prove compaction or rotation.\r\n3. **Synthetic-only success.** A direct compressor probe bypasses lease, persistence, and frontend ownership.\r\n4. **Mirrored-log overcounting.** The same event may appear in error and stdio logs; count an authoritative stream or deduplicate by timestamp\u002Fsession\u002Fmessage.\r\n5. **Test-warning confusion.** Failure-path tests deliberately log fake auth, quota, timeout, and malformed-response errors. Exclude the test run’s session\u002Ftime window before diagnosing production.\r\n6. **Late nominal threshold.** A large configured context window can defer compression beyond a custom gateway’s real ceiling.\r\n7. **Unsafe race “fix.”** Removing the durable-length guard can lose newer messages. Reload or reconcile; never publish the stale snapshot.\r\n8. **No-op ambiguity.** `compress_context` returns the input list object for lock-skip, durable-length abort, breaker\u002Fcooldown, empty-transcript refusal, and engine no-op. Only lock-skip sets `_compression_skipped_due_to_lock`; only a real compaction returns a different object. When auditing a no-op, check which abort path fired (log line + flag state) before concluding compression is broken.\r\n9. **Lock-state overclaim.** Zero current locks does not explain earlier lease contention or snapshot drift.\r\n10. **Private evidence leakage.** Report counts, states, and bounded error classes—not message bodies, credentials, endpoints, or raw payloads.\r\n11. **Timeout mislabeling.** A timed-out broad suite is incomplete, not green or red; run a bounded subset to completion.\r\n\r\n## Verification Checklist\r\n\r\n- [ ] Active profile\u002Fsession\u002Fplatform\u002Fprocess scope is fixed.\r\n- [ ] Effective trigger policy is compared with observed provider behavior.\r\n- [ ] Compression auxiliary route returns usable content or a classified failure.\r\n- [ ] Synthetic transform verifies shrinkage, metadata, alternation, and no fallback.\r\n- [ ] A focused regression subset completes.\r\n- [ ] Live logs are separated from test-generated warnings.\r\n- [ ] Durable active\u002Fcompacted rows, locks, and lineage are checked without message bodies.\r\n- [ ] The first unhealthy lifecycle layer is identified.\r\n- [ ] Verdict distinguishes core health from live-session health.\r\n- [ ] The report states whether anything was modified.\r\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"platforms":41,"description":7},"Hermes Agent","1.0.0",{"hermes":27},{"tags":28,"related_skills":36},[29,30,31,32,33,34,35],"hermes","context","compression","compaction","sessions","gateway","debugging",[37,38,39,40],"hermes-agent","hermes-interaction-debugging","systematic-debugging","privacy-safe-observability",[42,43,44],"linux","macos","windows","main","a3f3199bb87ec3c91248f68a39d88527e1847ae9","skills\u002F.archive\u002Fhermes-context-lifecycle-diagnostics","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content","https:\u002F\u002Fgithub.com\u002Fchaorenex1","https:\u002F\u002Fblog.aduib.com","A programmer whose only hobby in life is coding","2026-10-20 00:34:32",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add chaorenex1\u002Fhermes-home-content --skill hermes-context-lifecycle-diagnostics",{"tool":59,"command":60},"bunx","bunx skills add chaorenex1\u002Fhermes-home-content --skill hermes-context-lifecycle-diagnostics",{"tool":62,"command":63},"pnpm","pnpm dlx skills add chaorenex1\u002Fhermes-home-content --skill hermes-context-lifecycle-diagnostics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002F.archive\u002Fhermes-context-lifecycle-diagnostics\u002FSKILL.md",true,[67,73],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fcompression-health-check.md","REFERENCE","参考文档",8312,"https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002F.archive\u002Fhermes-context-lifecycle-diagnostics\u002Freferences\u002Fcompression-health-check.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fdurable-length-abort-audit.md",5865,"https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002F.archive\u002Fhermes-context-lifecycle-diagnostics\u002Freferences\u002Fdurable-length-abort-audit.md",[78,85,92,99,106,113],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7F8GF32YD5MBQW2TGSRH1YP","web-retrieval-resilience","Web tools fail or search rules break: repair or fall back.","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fweb-retrieval-resilience\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7F8FP46QESQMCZ1KBT3TW3R","blocked-page-recovery","Use when a fetch fails: 403\u002F429, paywall, WAF, bot wall.","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fblocked-page-recovery\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7F8ER6VXHBNVRQBZS7X08SE","verification-loop","Run a six-phase verification of a Claude Code session's work — build, type check, lint, tests with coverage, security grep, and diff review — then produce a PASS\u002FFAIL verification report. Use when verifying work after completing a feature or refactor, before creating a PR, or when quality gates must pass.","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7F8E4BQJ38KVQVM3MT20PYV","unreal-world-builder","开放世界与环境专家——精通 UE5 World Partition、Landscape、程序化植被、HLOD 和大规模关卡流式加载，打造无缝开放世界体验","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Funreal-engine\u002Funreal-world-builder\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7F8D747SQW2FTP7GBSX38BR","unreal-technical-artist","Unreal Engine 视觉管线专家——精通材质编辑器、Niagara 特效、程序化内容生成和 UE5 项目的美术到引擎管线","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Funreal-engine\u002Funreal-technical-artist\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7F8CKHYJVZVBTN0321J88T2","unreal-systems-engineer","性能与混合架构专家——精通 C++\u002FBlueprint 边界、Nanite 几何体、Lumen GI 和 Gameplay Ability System，面向 AAA 级 Unreal Engine 项目","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Funreal-engine\u002Funreal-systems-engineer\u002FSKILL.md",[],[]]