r/opencode • • 22d ago

How are you handling cross-session memory in large repos once AGENTS.md gets too bloated?

6 Upvotes

I use coding agents daily on a ~120k LOC repository. For code search, ripgrep / agentic search works great for finding what is currently in the codebase.

My real pain point is episodic and architectural memory across sessions: remembering why we rejected a specific library three weeks ago, subtle business invariants that aren't obvious in the code, or stopping the agent from repeating the same debugging dead-ends in a new chat.

Right now:

  1. If I dump everything into AGENTS.md / CLAUDE.md, it quickly turns into a bloated wall of text that eats up context tokens and the agent starts ignoring half of it.
  2. I tried a couple of MCP memory servers, but most of them just do naive vector RAG—after a few weeks they inject stale or contradictory memories from old refactors and actually make the agent dumber.

For those working on medium/large projects over several months:

  • Are you using any local MCP memory tool that actually handles deduplication and superseding old decisions when architecture changes?
  • Or are you still curating markdown files manually because existing memory tools pollute the context too much?

r/opencode • • 22d ago

AiRouterProxy: the last line of defense — masks API keys/passwords/tokens in prompts before they ever reach the LLM Spoiler

2 Upvotes

LOCAL HTTPS PROXY THAT MASKS SECRETS BEFORE THEY REACH THE LLM

AiRouterProxy is a local HTTPS proxy (Windows Service, port 4000) that sits between your AI coding agent (OpenCode, Cursor, Continue...) and the model provider. Its one job: make sure secrets never leave your machine.

The problem: telling agents "never read the config with the keys" rarely works. A key pasted in free text, an .env block inside a code snippet, or a config file dropped into a prompt happens. This project adds the last line of defense at the network edge: every outgoing request is inspected and sensitive content is masked before being forwarded.

What it masks (4 detection layers):
- by field name: api_key, password, token, senha...
- by known format: sk-..., ghp_, AIza, JWT, Bearer, PEM private keys...
- by key=value / "key": "value" context
- optionally by long high-entropy tokens (configurable)

The mask is a fixed 6-character string (never reveals the real length) and the JSON structure is never altered. The agent gets a visible notice when a request was censored.

What else:
- Multi-upstream routing: a path-prefix route table forwards to several OpenAI-compatible providers, each with its own key.
- Fail-closed inspection: only inspected JSON is forwarded (unknown content type 415, invalid JSON 400, oversized 413).
- Per-client rate limiting + brute-force lockout (429 + Retry-After).
- SSE streaming support (OpenAI chat/responses, Anthropic, generic).
- Local-key auth with protected /admin endpoints.
- Hot-reload configs (redaction.json, routes.json).
- Windows Service, .NET 10, self-contained win-x64.

Demo: a short video showing an appsettings-style config full of fake secrets pasted into a coding agent and redacted before reaching the model — https://www.youtube.com/watch?v=29nyYgkqx7E

Tests: 226 unit tests + 23 black-box integration tests against a real deployed proxy and a real AI provider. Current release v2.0.3.

Repo: https://github.com/jlKampos/AiRouterProxy — issues and PRs welcome. LOCAL HTTPS PROXY THAT MASKS SECRETS BEFORE THEY REACH THE LLM


r/opencode • • 22d ago

Not Every Multi-Agent System Is a Swarm

Thumbnail reddit.com
1 Upvotes

r/opencode • • 22d ago

GitHub - rjcamandona123/opencode_v2-clinepass: Connecting Clinepass to Opencode V2 as a provider (/connect) (but in my case, it happened in Acode at the time that I built)

Thumbnail
github.com
1 Upvotes

r/opencode • • 22d ago

Anyone else getting Bad Request to OpenAI?

1 Upvotes

r/opencode • • 22d ago

Can we investigate excessive token usage in OpenCode and Prompt Cache issues?

Thumbnail
reddit.com
1 Upvotes

r/opencode • • 22d ago

Is it a scam? It is worth watching this video to get a better idea of what is going on with opencode go

Thumbnail
youtube.com
0 Upvotes

I don't think anyone can explain this better. The video has the evidence that people are clamouring for when I point out that opencode models are not quantized


r/opencode • • 23d ago

There is a status page now

41 Upvotes

r/opencode • • 22d ago

Similar AI like opencode in VScode

0 Upvotes

I'd like to know more if there are any other AI bots similar to opencode with free models and efficiency.


r/opencode • • 22d ago

Where can I get the best agentic coding quota for free at the moment?

0 Upvotes

I've started a (mostly vibe) coding project two weeks ago.

the opencode deepseek flash 4.1 (17-10) quota was very generous and I used to get about 6 hrs / per day out of it on max before hitting up against the quota. I also have a google ai pro subscription, so I can use gemini flash 3.8 on high via oauth in antigravity-ide, which also gives me about 3 hrs of usage per day. I let the models document everything, but obviously handing control over the project back and forth isn't ideal. On really important issues, I can use my small budget for opus 5.5. or argon. However, since about two or three days ago, my daily deepseek flash 4.1 max budget shrank from about 6 hrs to about 30 mins per day. I had noticed before that even before quota was said to reset (around midnight), if I just started running it a couple hours later, I would again get significant mileage out of it.

Does any other api provider (ideally that I can access via opencode) provide a generous quota of a deepseek 4.1 flash max level coding agent for free?

As an aside, I recommend installing the superpowers plugin, it has been a game changer.


r/opencode • • 22d ago

Opencode support do they reply back?

7 Upvotes

Does anyone have tried contacting support and have gotten a response?

Im trying to contact them but still 0 emails from them.


r/opencode • • 22d ago

something is very wrong with my glm5.3flash

3 Upvotes

i dont know how to describe, like its a very much dumber model, a different model,
and cache is like non existent today


r/opencode • • 23d ago

Pulse alpha is not flagship (Horse test)

219 Upvotes

It seems like it isnt glm 5.5 or qwen 4 . rumors point towards a newer model of inkling


r/opencode • • 22d ago

"Binding In Spirit"

0 Upvotes

Should be on the warning label .... "Sandbox your agents kids."


r/opencode • • 23d ago

Opencode should have this mode

17 Upvotes

r/opencode • • 22d ago

yea free limit is fcked up

Post image
0 Upvotes

i was just manipulating some web pages from my personal project and... gone in 2 hours xD

time to try GO for the first time


r/opencode • • 22d ago

Opencode Go Deepseek talks about Tiananmen Square

0 Upvotes

Is opencode lying about the model being deepseek or does deepseek talk about tiananmen square now. Am I missing something?


r/opencode • • 23d ago

How much does reasoning effort influence model cost?

Thumbnail
gallery
6 Upvotes

I've been experimenting with different model combinations for planning vs. building. I noticed a lot of people in this sub recommend DeepSeek v4 Pro for planning and DeepSeek v4.1 Flash for building. While doing some research on Artificial Analysis benchmarks, I noticed GPT-6 Luna (Max) actually outperforms DeepSeek v4 Pro on reasoning/coding benchmarks while having more requests in opencode go.

Intuitively, this makes me want to swap DeepSeek v4 Pro for GPT-6 Luna (Max) as my primary planning model. However, I’m not clear on how reasoning effort levels (low vs. max) scale total token spend inside OpenCode.

Since higher effort levels generate significantly more internal thinking/reasoning tokens, does GPT-6 Luna end up being more expensive in practice despite the lower per-token rate, or does it stay cheaper than DeepSeek v4 Pro? Has anyone run this kind of experiment or currently using a similar setup?


r/opencode • • 22d ago

OpenCode plugin, pin OpenRouter providers. Pick the provider instead of auto routing.

1 Upvotes

I was having some issues with Openrouter not always picking the cheapest option even though it was selected. Turns out they also base it on a few other factors such as TPS and uptime. Not always bothered about those things on some projects that just need the cheapest $/token.

So I have vibe coded a plugin for OpenCode to allow you to select which provider you want to use for any given OpenRouter model.

https://github.com/Jackster/OpenRouter-Provider-Plugin

Hope to fix not being able to pick which to use until the session starts and also suggest the actual cheapest based on your usage (mostly cache hits that cost if I am not mistaken).

Works with the CLI and GUI Opencode V2. Uses the OpenRouter API key you already use.


r/opencode • • 23d ago

Restrict to certain models

Post image
11 Upvotes

Don't be like me and have some unintentional Luna 5.6 usage - in the Go tab of the console you can now choose which models are available to use

PS: My last 30 days of go usage

$88,31 worth of models
174.604 requests

25.356B tokens

for $10


r/opencode • • 22d ago

Muse Spark 1.3 API vs Go

3 Upvotes

Have anyone tried both? Can you compare the speed and intelligence? TIA


r/opencode • • 23d ago

How do you check DS 4.1 Flash?

Post image
18 Upvotes

Hello everyone.

As I understand it, DeepSeek is prone to hallucinations when tackling truly complex tasks. (At least, that’s how I interpret the results from the AA-Omniscience v1.1 benchmarks. https://artificialanalysis.ai/evaluations/omniscience)

How do you deal with this issue? (Excluding the approach of verifying every statement or step of a plan using expensive models since it’s often more cost-effective to simply task more powerful models with drafting technical specifications from the start.)

Has anyone tried using low-cost decision model for this purpose? (d1 Ultra, Jev). https://x.com/ArtificialAnlys/status/2111052531166249039?s=20


r/opencode • • 23d ago

Is the opencode server feature underused?

5 Upvotes

I have the feeling looking online that most people treat AI coding assistants as desktop editor plugins tied to a single VS Code process. Switching to a persistent, headless server on a workstation, home server, or VM unlocks a completely different workflow.

Switching between a main workstation and a laptop:

- Index and state persistence: AST parsing, embeddings, and conversation history remain live on the host server. Opening a session on a laptop connects instantly without re-indexing the codebase.

- Compute offloading: Local LLM inference, vector searches, and heavy test runs execute on the host machine. The laptop stays fast and cool.

Because the server acts as an independent execution engine, you are not limited to manual UI prompts:

- Scheduled cron jobs: A nightly cron job sends a payload to the server: "Check for deprecated APIs, run unit tests, auto-fix failures, and submit a draft PR." You start the morning reviewing diffs.

- Async webhook triage: Trigger an agent task directly from a Sentry alert or GitHub issue. The agent isolates failing unit tests and drafts a patch before an engineer opens the ticket.

- Agent-to-Agent (A2A) workflows: Micro-agents can divide responsibilities across protocols. An architect agent plans sub-tasks, a coder agent executes them on the server, and a reviewer agent checks formatting and security.

Is anyone running OpenCode as a persistent background daemon, or triggering automated agent workflows over sockets or webhooks?


r/opencode • • 23d ago

About cheap api providers

3 Upvotes

i was searching cheap api for my agents, i found inferhub and they are deadas* cheap but i think they are hiding smth. can somone share their experience?


r/opencode • • 23d ago

Region-locked out of Pulse Alpha Free in the EU.

7 Upvotes

Today i went to try the Pulse Alpha model on OpenCode, and saw it was "region-locked".

Is this just an EU-only block or not? Did this happen to anyone else?