Research – Ephemeral Context Protocol

đź§Ş CRAZY IDEA HIGHLY EXPERIMENTAL EARLY R&D NO FORMAL VALIDATION

Coding5s Research Lab · Ephemeral Context Protocol

What If the Conversation Could Die,
but the State Survived?

The Ephemeral Context Protocol (ECP) is a speculative architecture for externalizing the useful state of an AI interaction so a later, clean execution could continue without replaying the entire conversation. It began not as a grand AI theory, but as an attempt to solve a very practical problem: prompt and spreadsheet formula length limits.

Crazy Idea #01 · Coding5s

“I wanna find a solution to Tutorial Hell.”

A broad learning problem became the starting point for what eventually grew into the Coding5s Framework.

Crazy Idea #02 · ECP

“How can I make this prompt small enough to fit?”

Formula and payload constraints led to a more general question: how much context is actually necessary to reconstruct useful state?

ecp_conceptual_model
Growing Conversation
Prompt
↓
More Context
↓
More Context
↓
More Context…
→
ECP Hypothesis
Execute → Extract State → Store
↓
Terminate Session → Rehydrate
The Research Question

How little context is actually required to reconstruct useful state across otherwise ephemeral AI interactions?

!
This is not a validated persistence system. ECP is intentionally published as a Crazy Idea: an architectural hypothesis concrete enough to test, break, improve, or discard.

02 · Experimental Mechanics

Kill the Session.
Keep the State.

ECP treats the individual LLM session as disposable. The continuity does not live permanently inside the model—it lives in an external state representation that can be stored and injected into a later clean execution.

The Ephemeral Lifecycle
01 State Current useful context
02 Inject Send state with task
03 Execute LLM performs task
04 Extract Produce updated state
05 Persist Save externally
06 Terminate Session can disappear
07 Rehydrate Inject into next execution
LAYER 01

The Firmware

A compact decoding contract defines what each state field means. “Firmware” is an architectural metaphor—not literal model firmware.

CTX: environment / topic STG: workflow stage ACH: learner / system state FRC: friction / problem type QTY: requested quantity BLK: required components
LAYER 02

The Payload

The current state is represented as a compact structure instead of repeatedly sending the same explanatory prose.

Verbose

The user is learning Python Core, is currently debugging, has basic understanding…

Compact CTX:PY_CORE|STG:2|ACH:1|FRC:SYN_FOR_COLON

Important: fewer characters do not automatically mean fewer model tokens. Actual efficiency must be measured.

LAYER 03

The Exit Contract

The execution produces a new state that can become the starting context of a future session.

[STATE] CTX:PY_CORE STG:3 ACH:2 FRC:RESOLVED

One implementation could let the LLM generate the state directly; another could validate it in the backend before persistence.

Execution N
[STATE] CTX:PY_CORE|STG:3|ACH:2
→ ledger →
Execution N + 1
rehydrate CTX:PY_CORE|STG:3|ACH:2

Three Related Ideas. Three Different Jobs.

ECP should not be confused with Stateful5s or M2M Semantic Notation. They address related problems at different architectural layers.

STATEFUL5S The Goal

Preserve useful cumulative learning context across interactions.

ECP The Experimental Lifecycle

Externalize, persist, terminate, and later reconstruct useful state.

M2M One Possible Representation

Explore a compact machine-oriented notation for carrying that state.

ECP does not require M2M. The same lifecycle could theoretically use JSON, compact YAML, database records, another DSL, or other structured representations. M2M is the more speculative compression experiment.

03 · Research Boundary

What We Know.
What We Still Don’t.

ECP is deliberately published before the answers are known. The useful distinction is not between “good idea” and “bad idea,” but between what motivates the experiment and what still has to survive actual testing.

Reasonable Starting Points

What Motivates the Experiment

  • Repeated natural-language context consumes prompt space.
  • Spreadsheet-generated prompts can encounter practical length constraints.
  • Useful state can be stored outside an LLM and supplied again later.
  • Structured representations can sometimes encode information more compactly than equivalent prose.
Not Established

What Still Needs Evidence

  • Reliable token savings across different models and tokenizers.
  • Meaningful latency improvement in real systems.
  • Long-term state integrity across repeated rehydration cycles.
  • Model-independent semantic reconstruction.
  • Production scalability or superiority over conventional state management.

If It Works, Where Could It Matter?

These are speculative application spaces—not ECP deployments or demonstrated outcomes.

01 / EDTECH Learner State

Carry selected progress and learning context between short AI interactions.

02 / SUPPORT Case Continuity

Preserve troubleshooting state between automated or human-assisted handoffs.

03 / AGENTS Workflow State

Transfer selected operational state between otherwise disposable agent executions.

04 / GAMING NPC Memory

Persist selected world or character state without replaying complete interaction histories.

đź§Ş Why Publish a Crazy Idea?
The goal is not to protect the idea from failure. The goal is to make it concrete enough to test, break, improve—or discard.

ECP began with a practical constraint and expanded into a broader architectural question. It may prove useful, partially useful, unnecessary, or wrong. The Research Lab exists precisely so those possibilities can remain visible.

ECP ASKS How can useful state survive?

Externalize it, persist it, terminate the session, and attempt to reconstruct it later.

→
THE NEXT CRAZY IDEA How should machines represent that meaning?

M2M Semantic Notation generalizes the compression question from state persistence to AI-to-AI communication.

From ephemeral state to machine-oriented semantics. ECP asks how state might survive. M2M asks whether machines need human prose to exchange meaning at all.
Explore M2M Semantic Notation →
research.status = crazy_idea maturity = early_r_and_d formal_validation = none outcome = test_break_improve_or_discard

Scroll to Top