logoalt Hacker News

FeepingCreaturetoday at 8:19 AM1 replyview on HN

No, opencode allows bash by default.


Replies

sReinwaldtoday at 8:37 AM

OpenCode also defaults to ask for external_directory, which applies to bash commands touching paths outside the workspace.

    sre on archlinux  10.0.0.193 ~/opencode-test took 0s
    ﬌ opencode run "use bash to touch an empty txt file in my home dir"
    
    > build · moonshotai/kimi-k3
    
    ! permission requested: external_directory (/home/sre/*); auto-rejecting
     touch ~/empty.txt && ls -la ~/empty.txt failed
    Error: The user rejected permission to use this specific tool call.

    sre on archlinux  10.0.0.193 ~/opencode-test took 0s
     opencode run --auto "use bash to touch an empty txt file in my home dir"
    
    > build · moonshotai/kimi-k3
    
    $ touch ~/empty.txt && ls -l ~/empty.txt
    -rw-r--r-- 1 sre sre 0 Aug 24 10:34 /home/sre/empty.txt
    
    Done — created `/home/sre/empty.txt` (0 bytes).    
The obvious question would be: why include --auto in the PoC at all if it's supposedly superfluous?
show 1 reply