by verdverm · 1mo ago · 0 comments
I think the benefits of this one vastly outweigh the risks since it enables the self-modification Pi (!) became famous for.
There does not seem to be a flag for this, not finding any configuration options yet either, and there is the shared server aspect now too.
you cannot have both and be serious about security
to be clear, I'm talking about hot reload, agent can manipulate its own environment in real time, that's asking for trouble, put some controls on that or reap the consequences from loss of control
Pi’s whole UI is customizable, so a lot of people were having their agents build their own interfaces.
The distinction is probably irrelevant for most people. I secure the whole thing in a container, because I lack the willpower to audit a bajillion lines of LLM code just inside the harness.
What stops your agent from adding a new MCP server on its own? Would you consider that a gap in security posturing?
Why not? I think DSH does this pretty well with an agent preset that exposes the tools required for the agent to modify the harness.
It's kind of like how the kernel can expose interfaces to allow userspace to load kernel modules at runtime: you "just" have to control which processes can use them.
Between that, and a couple of extra injected bwrap args to make my SSH keys and LLM API credentials unreadable from the agent's shell by default, I'm pretty comfortable using the harness outside of a VM for most things.
If an agent can change the harness it is running in, in real-time, all bets are off
There is semantic ambiguity here. An agent being able to write plugin code for the harness it runs in is related, but orthogonal, to the real-time or not availability of that plugin to the current session.
When I have my agents assist with plugins, I pay closer attention and either do the testing myself or have them run the altered harness in another instance.
Part of this is because they have borked themselves and it can be super annoying to undo their f-ups. Little qwen did this once, breaking its own connection to vllm.
It was the big selling point of the harness a couple months ago.
1. agent != harness, Pi is a harness, agents running under Pi can do things, Pi is not the actor or agent
2. self modification vs Pi supports customization / extension / plugin
3. hot-reload (real time modification) vs restart/reload (agent can be blocked)
but "self modification" sounds cooler, I guess
Then I upgraded OpenCode to 2.0 and pretty much all the bugs vanished. I still wish there was a happy medium between "parse tool calls for perms" (which fails all the time if the tool call is long/complex enough) and a full-on sandbox, but otherwise 2.0 is really solid.
Cordis also looks interesting as an alternative, but appears more bound to DSH rather than a more general thing (which I prefer).
This is all a stopgap until I have some time to go back to my personal/custom harness.
2. opencode 2.0 does not exists. I mean it: there is no release[1] and per their own instructions, `npm i -g @opencode/cli@latest` does not install opencode 2.0.
3. `Error: @opencode/cli's postinstall script was not run.` Not even running postinstall.js can fix that, neither on linux nor macos. And even if it works, in a couple of days or on the next upgrade it will fail again.
Fun fact: The npm release does not contain the code, it is downloaded by the postinsta script. Galaxy brain.
npm install -g --allow-scripts=@opencode/cli @opencode/cli- several poor security mistakes or choices that broke my trust
- trying to be closer to an IDE, all these harnesses want to be the interface to rule them all, that's not what I want in my harness
- doing things that another tool, which is harness independent, should own (multiple async/parallel agents)
- too much change dropped at once, so many breaking changes, several I cannot migrate at work without impacting the devs I support
I heard it from someone as well, but I cannot find the link or specific details.
Can someone summarise what are the security issues related to using opencode?
Do these issues still exist, especially in V2 ?