cd /news/developer-tools/egc-your-ai-agents-never-start-from-… · home topics developer-tools article
[ARTICLE · art-35144] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

EGC: Your AI agents never start from zero again

A developer released EGC (Extended Global Context), a local runtime that gives AI coding tools persistent memory across sessions. EGC saves decisions, failures, and preferences at the end of each session and loads them automatically at the start, eliminating the need to re-explain project context. The tool supports multiple AI assistants including Claude, Gemini, Cursor, and Copilot, and is available as an open-source npm package.

read2 min views1 publishedJun 20, 2026

Every time you open a new session with an AI coding tool, it starts from zero. It does not know what you decided yesterday, what failed last week, or what comes next. You have to explain the project again. And again.

EGC (Extended Global Context) fixes this.

EGC is a local runtime that gives every AI coding tool you use a persistent memory. At the end of each session, the AI saves what it learned: decisions made, what failed, your preferences, what comes next. At the start of the next session, it loads that state back automatically.

One install. Every tool. Every session.

Website: https://fmarzochi.github.io/EGCSite

You open Claude Code on a project you have not touched in two weeks. Without typing anything:

State loaded from egc-memory via ~/.egc/state/Projects--MyApp.md
Context and preferences acknowledged.
Ready to pick up:
  - Test full install on a clean machine
  - Add GEMINI.md with session memory protocol
  - Publish v1.0.1 fix after clean install test passes

The AI already knows what you were building, what decisions you made, what failed, and exactly where you stopped. You did not type anything. You just started working.

EGC ships two MCP servers that run locally during every session.

Tool What it does
get_state
Loads project memory at session start
update_state
Saves decisions, preferences, and next steps
store_decision
Persists a single decision to SQLite
query_history
Returns past decisions by timestamp
search_history
Full-text search with BM25 ranking
working_memory_set
Stores transient context with a TTL
lesson_save
Records cross-session knowledge with confidence decay
lesson_recall
Retrieves active lessons above a threshold
detect_patterns
Surfaces repeated commands and recurring errors
compress_observations
Compresses hook events to save token budget

State files live at ~/.egc/state/<project-slug>.md

. One file per project. Plain Markdown. Human-readable.

Tool What it does
validate_command
Checks shell commands before execution
validate_write
Validates file paths to prevent unsafe writes
reduce_context
Compresses file payloads to save token budget
orchestrate_task
Routes prompts with agent/skill context
auto_learn
Mines session failures and writes lessons to CLAUDE.md

EGC installs into whichever tools you already use:

All of them read from and write to the same ~/.egc/state/

directory. What Claude knows, Gemini knows. No copy-paste, no re-explanation.

npm install -g @egchq/egc && egc install

Or without installing globally:

npx @egchq/egc install

EGC detects which tools you have installed and sets them up automatically.

EGC ships 479 components as a bonus: 63 agents, 229 skills, and 76 commands written from real engineering sessions. Skip them entirely and EGC still gives you persistent memory. Or use them to extend any AI tool you already have.

npx skills add Fmarzochi/EGC

EGC is MIT licensed, built by one developer, maintained in the open.

@egchq/egc

If EGC changed how you work, a star goes a long way.

── more in #developer-tools 4 stories · sorted by recency
── more on @egc 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/egc-your-ai-agents-n…] indexed:0 read:2min 2026-06-20 ·