DEV Community

Kshitiz Maurya
Kshitiz Maurya

Posted on

I Built an 'Open World' AI Coding Agent — It Works From ANY Folder

The Problem

Every AI coding agent I've used has the same fatal flaw: it forgets when you close the session.

Open from folder A → works great
Close → Open folder B → "Who are you? What are we working on?"

Forgetting context isn't just annoying. It's a productivity killer.

The Solution: Open World Architecture

I built a memory system for OpenCode that transforms it from a stateless assistant into a persistent collaborator.

What I Created

~/.config/opencode/
├── .global/              ← YOUR WORKSPACE
│   ├── skills/          ← Custom skills
│   ├── memory/           ← Persistent memory
│   └── projects/         ← Work tracking
├── skills/              ← Base skills
└── plugins/             ← System plugins
Enter fullscreen mode Exit fullscreen mode

The magic: .global/ folder survives folder changes.

Key Features

1. Global Memory

Memory persists across ALL folders. Your preferences, decisions, and context follow you everywhere.

2. Sandbox Upgrades

Want to test a new skill? Create it in .global/skills/. It runs without touching the base installation. Broken? Delete it. Base unaffected.

3. Self-Healing

Crash recovery built-in. The agent auto-restores from backup if something breaks.

4. One-Command Install

git clone https://github.com/Kshitiz-Maurya/opencode-enhanced.git
.\install.ps1
# Done!
Enter fullscreen mode Exit fullscreen mode

How It's Different

Feature Traditional AI Agent My Creation
Memory Session only Global (all folders)
Upgrades Risk breaking Sandbox safe
Setup Manual One-command
Recovery Manual Auto-healing
Sharing Copy files Git clone

Try It Yourself

# Clone the starter kit
git clone https://github.com/Kshitiz-Maurya/opencode-enhanced.git

# Run install
.\install.ps1

# Restart OpenCode
# Done! Memory persists from any folder
Enter fullscreen mode Exit fullscreen mode

What's Next?

This is v1. I'm testing it myself before public launch. But the concept is solid: an AI that remembers, learns, and grows with you — not just in one project, but across your entire development workflow.

What do you think? Would a persistent-memory AI coding agent help your workflow?


Built with OpenCode. The architecture is MIT licensed — fork it and make it yours.

Top comments (0)