Skip to main content

Context hygiene for agentic coding. Save and resume Claude Code/Codex sessions.

Project description

Novyx Hygiene

PyPI version License: MIT

Context hygiene for agentic coding. Because manually exporting/copying/pasting session state is bullshit.

Novyx Hygiene automates the session persistence workflow that Claude Code and Codex users are doing manually: export context, clear the session, paste it back, and hope nothing got lost.

Built on Novyx Core — persistent memory that survives session resets.


The Problem

You're coding with Claude Code or Codex. Your context fills up. You need to:

  1. Run /export to copy everything
  2. Run /clear to reset the session
  3. Paste the context back
  4. Re-establish where you were

Every. Single. Time.

Worse: if you forget to export before compaction hits, you lose context. If you mix missions in one session, the context gets contaminated.

Reddit is full of workarounds. Velvet Shark wrote a whole guide on manual context management.

This shouldn't be manual.


The Solution

Three commands. Zero friction.

# Save your current session state
hygiene save "Implementing auth flow"

# Later... resume where you left off
hygiene resume
# Paste the output into your new Claude/Codex session

# See all your saved sessions
hygiene list

30-Second Demo

# You're deep in a coding session
$ hygiene save "Refactoring payment module - Stripe integration halfway done" Session saved: refactoring-payment-module
  Task: Refactoring payment module - Stripe integration halfway done
  Files touched: src/payments/stripe.py, tests/test_payments.py
  Decisions: 3
  Timestamp: 2026-03-08T12:46:00Z

# Context fills up, you clear the session
$ /clear

# Resume with full context
$ hygiene resume
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 SESSION CONTEXT: refactoring-payment-module
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 Task: Refactoring payment module - Stripe integration halfway done

📝 Key Decisions:
   Using Stripe's new Payment Intents API (not Charges)
   Webhook handler goes in src/webhooks/stripe.py
   Keeping backward compatibility for existing customers

📁 Files in Flight:
   src/payments/stripe.py (lines 45-120 modified)
   tests/test_payments.py (new test file) Status: In progress - webhook handler pending

💾 Session ID: refactoring-payment-module
   Saved: 2026-03-08T12:46:00Z

Paste this into your Claude/Codex session to continue.

Installation

pip install novyx-hygiene

Works out of the box — no API key required for local mode. Sessions are saved to ~/.novyx_hygiene/sessions/.

Optional: Set your Novyx API key for cloud persistence, semantic search, and cross-machine sync:

export NOVYX_API_KEY="nram_your_key_here"
# or
hygiene config set api_key nram_your_key_here

Commands

hygiene save <task-description>

Save current session state to Novyx Core.

hygiene save "Building user auth flow"

Captures:

  • Task description
  • Working directory
  • Recent git status
  • Files you've touched (from git)
  • Any decisions you flag

hygiene resume [session-id]

Print formatted context to paste into a new session.

# Resume last session
hygiene resume

# Resume specific session
hygiene resume refactoring-payment-module

hygiene list

List all saved sessions.

hygiene list

Output:

SESSIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

refactoring-payment-module
  Building payment module - Stripe integration
  Saved: 2 hours ago
  Status: In progress

api-redesign
  Migrating from REST to GraphQL
  Saved: 1 day ago
  Status: Completed

hygiene config

Manage configuration.

hygiene config set api_key nram_xxx
hygiene config show

Why Novyx Core?

Novyx Hygiene uses Novyx Core for persistence:

  • Semantic search — Find sessions by description, not just ID
  • Integrity verification — SHA-256 every artifact
  • Rollback — Accidentally overwrote a session? Roll back.
  • Audit trail — Know when you saved what

Your session state survives compaction, session resets, even computer restarts.


Workflow Integration

With Claude Code

# Before your session gets heavy
hygiene save "Task description here"

# When context fills up
/compact

# Or start fresh
/clear
hygiene resume

With Codex CLI

# Save before you hit rate limits
codex "implement feature"
hygiene save "Feature X halfway done"

# Later, resume
codex
# Paste hygiene resume output

Roadmap

v1.0 (Tonight): Save, resume, list. The core workflow.

v2.0 (Soon):

  • Auto-monitor context usage
  • MCP token tracking
  • Smart pruning suggestions

License

MIT © Novyx Labs


Built by developers, for developers. Stop exporting and start shipping.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

novyx_hygiene-1.0.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

novyx_hygiene-1.0.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file novyx_hygiene-1.0.0.tar.gz.

File metadata

  • Download URL: novyx_hygiene-1.0.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for novyx_hygiene-1.0.0.tar.gz
Algorithm Hash digest
SHA256 829112f68d7ce1b56a3407942fb175c3f19eaf1493df8a0f8754015e734210e2
MD5 33979f6898f1623373e31508083f669e
BLAKE2b-256 039a70eca539a66f2d75688d4ca9844003bc33ee979df686e58b938da6265132

See more details on using hashes here.

Provenance

The following attestation bundles were made for novyx_hygiene-1.0.0.tar.gz:

Publisher: publish.yml on novyxlabs/novyx-hygiene

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file novyx_hygiene-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: novyx_hygiene-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for novyx_hygiene-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25bc779a54b13d383628b441b5ea04768e85f4b3d107db54c1043ed3ca503467
MD5 f3904537fe1e21e348e0d4077341eab3
BLAKE2b-256 6511a2e4ad41f994d8d28a7154041908f12cd4ba66823936e32dac7611c582fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for novyx_hygiene-1.0.0-py3-none-any.whl:

Publisher: publish.yml on novyxlabs/novyx-hygiene

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page