∞ forever components

Claude Code Objects

Context Jar

Glass jar of sand strata (system, memory, files, conversation). Grains pour until a lid presses the jar into one dense summary band, like /compact.

canvasmedium complexitymoderate motionclick

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
1

When to use it

Explaining context windows, compaction or auto-compact.

When not to

A literal token meter or exact usage figures are needed.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Palette: warm graphite, clay, ochre and sage. Glass jar with four sand strata that compress into one summary band when a lid presses down; one percentage as text.

Safe to edit

  • colour tokens on :root (strata use stone, ochre, sage, clay, dense)
  • ST strata table, pour rates and the 0.8 compact threshold in the script

Keep intact

  • demo-v1: __foreverPreview.demoEnabled, forever:interactive, first-input takeover
  • theme: ?theme=, forever:theme messages, light tokens
  • IIFE, visibilitychange, reduced motion, keyboard, aria-live

Known limitations

  • Canvas drawn; strata percentages are illustrative, not real token counts.
  • After a deliberate input the pour slows but keeps going and still auto-compacts.

jarsandglasscontextcompactcanvas

More Claude Code Objects components

  • Mode KeyBrass key in a cylinder lock on an enamel plate. Three detents (ask, edits, plan) like Shift+Tab; the key turns with spring overshoot and a lamp changes…
  • Allow StampPaper slip with one command and a rubber stamp that inks ALLOW or DENY, then the slip joins a pile, like a permission prompt.
  • Sub-agent OrbitChalk-on-ink diagram: a pulsing core launches sub-agent moons onto elliptical orbits; each works, curves back and merges, adding a bead to the core. Max…
  • Hunk DeckA stack of index cards, each an abstract diff; swipe right to keep a hunk, left to reject it.
  • Rewind ReelOpen-reel tape writes file blocks; rewind returns to the previous checkpoint and un-writes them.
  • MCP Patch BayFelt patch bay with braided cables, brass sockets and live packets; amber signals reconnection.