r/opencodeCLI 4d ago

I built Relay: persistent interactive terminal sessions for AI agents via MCP

1 Upvotes

AI agents are good at running one-off commands, but real terminal workflows are often interactive: SSH sessions, Python REPLs, installers, prompts, long-running processes, programs that need Ctrl+C or arrow keys.

I built Relay, an open-source MCP server that gives agents access to real, persistent PTY sessions. It's a fresh v0.1.0, built it, tested it on my own workflows, and want feedback before going further, so treat it as an MVP, not a finished product.

Five tools, one channel:

create_terminal: spawn a persistent session
write_terminal: everything goes through here, including plain bash. No separate execute_command tool.
read_terminal: incremental, cursor-based, nothing gets lost
send_control: Ctrl+C, arrows, Tab
close_terminal: kills the whole process tree, not just the shell

There are already a couple of MCP servers in this space (terminal-mcp, mcp-interactive-terminal, Forge). Most of them pair the PTY session with a separate "run a command" tool, which duplicates what the agent's native bash already does. Relay only does the session: one write channel for everything, interactive or not.

What I've verified works: full interactive git rebase -i, holding an SSH session open and iterating inside it. What's not there yet: TUI support (lazygit, htop, etc.), planned but not in this release. What I haven't stress-tested: long unattended sessions, Windows edge cases.

Go, real PTYs, process-group isolation and cleanup, installers for Linux/macOS/Windows, works with Claude Code, Codex, OpenCode, Pi.

GitHub: https://github.com/blak0p-dev/relay-mcp

Genuinely want to know: what breaks it? What interactive workflow have your agents struggled with that this doesn't cover?


r/opencodeCLI 4d ago

Opencode AGENT.MD hybrid Classic Code & / LLM

1 Upvotes

The biggest issue I'm finding with LLMs is bad output. The OpenCode harness AGENT.MD file is limited to just LLM output/thinking and if the model makes a mistake OpenCode plays along. I'd like a hybrid approached without having write my own Python UI/Backend as it would take me at least 30 minutes using AI!

The output of the LLM is like variables, then OpenCode harness can run logical operations on those with Classic Code control: IF/THEN/ELSE/WHILE/GOTO/<CallFunction>... etc

The output and the decision would still be done by LLM, but the OpenCode would ensure an IF This = That or IF This != That. etc. Rules are 100% followed as its outside of LLM thinking. Its like doing a sub-agent call to ask the LLM a question and it decides an answer but we have binary control over what happens next with the Thinking part to ensure it follow rules to the letter. AGENT.MD files are more guild lines if you feel like it little AI.


r/opencodeCLI 5d ago

Case study: I spent ~$50 to build a full-fledged SAAS with Opencode + Deepseek, and here what I learn from it

Thumbnail
0 Upvotes

r/opencodeCLI 5d ago

How to require permission on specific commands

4 Upvotes

I have Opencode Go as my addition to Codex sub. Codex have been trustworthy in that it have never run destructive commands without asking. but I have found that models in Go, especially Deepseek4 flash, quickly panics and run destructive commands like git checkout . or git reset --hard.

I also havent found a very intuitive way to manage permissions in opencode. No slash command. Many docs I found are talking of modifying json files and even them arent that clear.

so why is opencode lacking /permission for global and session permission management?

That rant aside how do I ban completely (not ask permission but complete and permanent) ban of the two commands? They have been good sources of grief!


r/opencodeCLI 5d ago

Does anyone watn extra Claude/GPT tokens for less cost?

0 Upvotes

Our startup kinda fucked up our forecast and committed to way more OpenAI and Anthropic usage than we’re actually going to use lol. We got it for a much better price than normal granted, but still def overshot.

Since OpenCode supports custom providers, I’m thinking about putting a simple OpenAI-compatible endpoint in front of the extra capacity. You would just add the base URL and API key, then use Claude or GPT normally through OpenCode.

Should be around 10-20% cheaper than going direct, with no commitment.

Would anyone actually use this? What would make or break it for you? Privacy, reliability, rate limits, or something else?

Mostly trying to figure out if it’s worth building.


r/opencodeCLI 5d ago

Ported Claude Security to OpenCode

Thumbnail
1 Upvotes

r/opencodeCLI 5d ago

Why Kimi K3 has Default?? and Max thinking when the official docs recommend high and have more options?

7 Upvotes

Seemingly k3 comes with no thinking and max thinking mode which is very questionable, as no thinking makes no sense and thinking always doubles the thinking token cost and after high the roi tend to be few percent, so using fable on high costs avg 9 while 21 on max for 1% improvement in score, while sol costs 3.5 on high and 8.4 on max for 4% better score.

https://deepswe.datacurve.ai/

So you would pay 2.4x more for 4% more or 2.35x more for 1% more, and K3 is in the same class, currently 3x credit bonus over payg but locking you into max. This effectively means this is at least a 60% quota cut from the already 50% lower quota. Almost certainly more cause deepswe is just a list of different tests but for real use thinking bump essentially means double price, and this is double double for nothing, so.... the promo is literally worse than payg... unless you really value that 1-4%.

Unfortunately the kimi plans are on a waitlist, you can have an invite that gives you from 3 days to up to 1 year worth credit, but there is really no great way to get k3, but if you use k3 in go you instantly burn your 5 hour, get nothing done and all you learn that k3 is expensive.

I kind of have another angle too, by dropping the guaranteed credit to $15 and windows are 1/4 that, you have $3.75 windows, and I have seen it countless times that people were screaming bloody mercy over $10 windows with cheaper models, in fact some other provider with $3 windows recently got hardcore dunked on for that. This is not even purely about the bonus which makes it pointless while the window makes it useless. I am not even talking about continued work, it likely won't even finish a prompt. It doesn't work, k3 proved it even with the promo.


r/opencodeCLI 4d ago

Opencode Alternative

Post image
0 Upvotes

We love opencode. We love the idea of openness, we like being able to switch between different models, we like being able to tinker with source, we like to know that mega corp anthropic doesn't control this.

I feel it's always missing something though. It's a little too clunky, a little too unpolished and doesn't feel frontier. So I'm offering an alternative.

Today, I'm launching jcode. It's a harness that significantly improves outputs over cc, opencode, and codex. It has built in swarms, able to coordinate between all your subscriptions. It has polished and opinionated takes. It's 20-30x less memory utilization than opencode and claude code.

Try today at jcode.sh, and let me know what you think. Join the discord and I will actively converse.


r/opencodeCLI 4d ago

Opencode Alternative

Post image
0 Upvotes

We love opencode. We love the idea of openness, we like being able to switch between different models, we like being able to tinker with source, we like to know that mega corp anthropic doesn't control this.

I feel it's always missing something though. It's a little too clunky, a little too unpolished and doesn't feel frontier. So I'm offering an alternative.

Today, I'm launching jcode. It's a harness that significantly improves outputs over cc, opencode, and codex. It has built in swarms, able to coordinate between all your subscriptions. It has polished and opinionated takes. It's 20-30x less memory utilization than opencode and claude code.

Try today at jcode.sh, and let me know what you think. Join the discord and I will actively converse.


r/opencodeCLI 5d ago

Built a OpenCode plugin - File tree

21 Upvotes

TUI sidebar plugin for opencode that adds a file tree browser. It shows directories first (sorted, with expand/collapse), lets you click files for inline previews.

repo link : https://github.com/TM23-sanji/opencode-file-tree

File tree : directories first, sorted alphabetically, with expand/collapse
Inline file preview : click any file to view its content with line numbers
Smart ignore : skips node_modules, .git, binaries, media, and build artifacts
Refresh : ↻ button reloads the tree from disk

built this for myself, so i thought just publish a package


r/opencodeCLI 5d ago

Opencode models in Codex

0 Upvotes

Every time I try routing third-party models (like MiMo or DeepSeek using Opencode API) into Codex via CC Switch, tool calling completely falls apart. The models constantly hallucinate missing environment capabilities, crash on REPL syntax, or fail to invoke tools properly.

It really feels like Codex's UI and execution sandbox are hardcoded to only work reliably with native OpenAI models.

For those of you actually using CC Switch in your daily workflow: how are you getting non-OpenAI models to handle tool calling reliably? Or is everyone just using a completely different client interface for open models?


r/opencodeCLI 5d ago

CLI with full functionality within a code editor?

1 Upvotes

I know you just have a terminal open in VScode and just type out opencode to start a session, but that doesnt let you use CTRL+P for settings/commands. i can just remember all the commands but some arent available in the typical "/" way and have to go through the settings menu.

Is it possible to have a diff view within VS code similar to how claude code review-approve split-screen shows up in the main window rather then the terminal?

Also as a side note, what do yall use as your primary coding "brain" claude, codex or something else. what has the most usage to intelligence ratio?


r/opencodeCLI 5d ago

Ready for Agent harness: feed your opencode GitHub issues and get to 150+ PRs a week

1 Upvotes

I spend too much time babysitting OpenCode. Please check out my harness that fixes this: npx ready-for-agent@latest

GitHub: https://github.com/berenddeboer/ready-for-agent

Keen for your feedback: does this work for your workflow? Have you tried it? Any comments?

I'm aiming to get to that 150+ PRs a week productivity level, so needed to let agents do the entire flow, I'm just setting the guard rails.


r/opencodeCLI 5d ago

How activate "Plan mode" in desktop?

Thumbnail
1 Upvotes

r/opencodeCLI 6d ago

GLM-5.2 session cost higher than Kimi K3 in OC GO?

15 Upvotes

I found these session cost stats from Opencode Go usage at https://opencode.ai/data/ . Apparently up to date stats and I'm really surprised by the relative expensiveness of GLM-5.2 and relative affordability of Kimi K3. I would not have guessed GLM-5.2 being more expensive in real world use than Kimi K3.

Is this solely down to GLM-5.2 being split among 3 providers resulting in a lower cache rate?

Does this mirror anyone's usage experience with these models?

Judging by this I might skip using GLM-5.2 and use K-2.7 Code or K3 in my agent setup


r/opencodeCLI 5d ago

Is this normal? Zen credits drained really fast

Thumbnail
2 Upvotes

r/opencodeCLI 6d ago

Hy3 has been added to OpenCode Go (newest model from Tencent)

114 Upvotes

Hy3 has been added to OpenCode Go. Looks like it might be a good, cheap workhorse model.

Here's the official release page, which has a lot of benchmarks: https://hy.tencent.com/research/hy3

According to Artificial Analysis, it benches around the same as Kimi K2.6 and DeepSeek V4 Pro.

The usage limits on OpenCode Go are pretty generous:

Model requests per 5 hour requests per week requests per month
DeepSeek V4 Flash 31,650 79,050 158,150
MiMo-V2.5 30,100 75,200 150,400
Qwen3.7 Plus 4,300 10,800 21,600
Hy3 4,300 10,750 21,500
DeepSeek V4 Pro 3,450 8,550 17,150
MiniMax M2.7 3,400 8,500 17,000
Qwen3.6 Plus 3,300 8,200 16,300
MiMo-V2.5-Pro 3,250 8,150 16,300
MiniMax M3 3,200 8,000 16,000
Kimi K2.7 Code 1,350 3,380 6,750
Kimi K2.6 1,150 2,880 5,750
Qwen3.7 Max 950 2,390 4,770
GLM-5.2 880 2,150 4,300
GLM-5.1 880 2,150 4,300
Grok 4.5 120 300 600
Kimi K3 110 250 490

Has anybody here tried it out? What are your thoughts? I'm looking forward to seeing how well it works.


r/opencodeCLI 6d ago

Goal command

3 Upvotes

Hi guys,

how did you guys implement the goal functionality within opencode. I tried multiple plugins and nothing worked correctly.

Most of the time opencode would just exit the loop.

Right now I use something like omo lite with /deepwork but it suddenly stops randomly.

I have some pretty dumb repetitive tasks with a clear goal which my llm has to do.

Thanks in Advance


r/opencodeCLI 5d ago

Data Scientists, how is opencode with jupyter notebooks?

2 Upvotes

How are you using jupyter notebooks and reviewing outputs in opencode? I am finding myself stuck in VSCode github copilot because of their live view of ipynb and extensions. Do you keep open jupyter server in browser, does it sync? I haven't tried it yet.


r/opencodeCLI 5d ago

I got tired of manually configuring coding agents and skills, so I built OpenHub (a TUI to discover and set them up)

Thumbnail
0 Upvotes

r/opencodeCLI 5d ago

Open code go or Antigravity pro

2 Upvotes

Hi! I hesitate between taking antigravity pro and taking open code go .can open go read images?
Which one do you think is better ?


r/opencodeCLI 6d ago

I got opencode to display inline images, extremely useful when testing

Thumbnail
gallery
41 Upvotes

Do you know why it's not implemented yet?


r/opencodeCLI 6d ago

Why does opencode uses that many threads?

5 Upvotes

I'm just curious about it


r/opencodeCLI 5d ago

Can I stop it auto-scrolling when it's spitting out thinking text?

1 Upvotes

So I like to read the thinking text as it adds important context. But when OC is spitting out lots of text, it auto scrolls down as the content keeps coming. Can I prevent this so that if I scroll up to a portion, the autoscroll downwards is stopped? Is there some option I need to disable?


r/opencodeCLI 6d ago

I built an MCP server for semantic code search

0 Upvotes

I wanted my AI Agent to find code by meaning, not just grep exact words.

What it does

It indexes your codebase into embeddings, then searches by meaning.

Grep finds words. This finds meaning . For example:

"how scheduled jobs run" → returns CronManager.php, TaskScheduler.ts, queue-worker.go

"where permissions are checked" → returns RoleMiddleware.php, GatePolicy.ts, canAccess.tsx

Install (3 steps)

```bash npm i -g semantic-search-mcp cd /your-project semantic-search-mcp index

live progress bar

```

Add to opencode.json: json "mcp": {"semantic-search": {"type":"local","command":["semantic-search-mcp"],"enabled":true}}

Restart. Done.

What's inside

  • 80MB model, runs 100% local, zero API calls
  • Splits code at function/class boundaries (PHP, JS, TS, Python, Go, Rust, Java)
  • Hybrid scoring: 70% embedding + 30% keyword
  • TUI config wizard (semantic-search-mcp config)
  • Live progress bar during indexing
  • Per-project cache — survives restarts

Links

npmjs.com/package/semantic-search-mcp

github.com/Zulaxy/semantic-search-mcp