Description
Saw lot of issues opened but no one provided logs cleanly, soo here it goes:
miguvt@nixos /e/nixos (main) [1]> opencode --print-logs --log-level DEBUG run "hi"
timestamp=2026-09-16T16:37:39.336Z level=INFO run=d2699f38 message="creating instance" directory=/etc/nixos
timestamp=2026-09-16T16:37:39.337Z level=INFO run=d2699f38 message=fromDirectory directory=/etc/nixos
timestamp=2026-09-16T16:37:39.359Z level=INFO run=d2699f38 message=bootstrapping directory=/etc/nixos
timestamp=2026-09-16T16:37:39.365Z level=INFO run=d2699f38 message=loading path=/home/miguvt/.config/opencode/config.json
timestamp=2026-09-16T16:37:39.366Z level=INFO run=d2699f38 message=loading path=/home/miguvt/.config/opencode/opencode.json
timestamp=2026-09-16T16:37:39.369Z level=INFO run=d2699f38 message=loading path=/home/miguvt/.config/opencode/opencode.jsonc
timestamp=2026-09-16T16:37:39.418Z level=INFO run=d2699f38 message="all LSPs are disabled"
timestamp=2026-09-16T16:37:39.419Z level=INFO run=d2699f38 message="all formatters are disabled"
timestamp=2026-09-16T16:37:39.419Z level=INFO run=d2699f38 message=init
timestamp=2026-09-16T16:37:39.499Z level=INFO run=d2699f38 message=created id=ses_f54eb3dd4ffeYaX03UHFdIWDrD slug=hidden-orchid version=1.18.30 projectID=d310466c572f92051e7d9b1b3733725e3eaa20d8 directory=/etc/nixos path="" workspaceID=undefined parentID=undefined title="New session - 2026-09-16T16:37:39.499Z" agent=undefined model=undefined metadata=undefined permission="[{\"permission\":\"question\",\"pattern\":\"*\",\"action\":\"deny\"},{\"permission\":\"plan_enter\",\"pattern\":\"*\",\"action\":\"deny\"},{\"permission\":\"plan_exit\",\"pattern\":\"*\",\"action\":\"deny\"}]" cost=0 tokens.input=0 tokens.output=0 tokens.reasoning=0 tokens.cache.read=0 tokens.cache.write=0 time.created=1789576659499 time.updated=1789576659499
timestamp=2026-09-16T16:37:39.507Z level=INFO run=d2699f38 message="event connected"
timestamp=2026-09-16T16:37:39.767Z level=INFO run=d2699f38 message=loop session.id=ses_f54eb3dd4ffeYaX03UHFdIWDrD step=0
> build · qwen3.8-27b
timestamp=2026-09-16T16:37:39.773Z level=INFO run=d2699f38 message=stream providerID=local-llama modelID=qwen3.8-27b session.id=ses_f54eb3dd4ffeYaX03UHFdIWDrD small=true agent=title mode=primary
timestamp=2026-09-16T16:37:39.781Z level=INFO run=d2699f38 message="llm runtime selected" llm.runtime=ai-sdk llm.provider=local-llama llm.model=qwen3.8-27b
timestamp=2026-09-16T16:37:39.790Z level=ERROR run=d2699f38 message="stream error" providerID=local-llama modelID=qwen3.8-27b session.id=ses_f54eb3dd4ffeYaX03UHFdIWDrD small=true agent=title mode=primary error.error="AI_APICallError: Invalid API Key"
timestamp=2026-09-16T16:37:39.797Z level=INFO run=d2699f38 message=tracking hash=647a091fe6ceca3693968f6310e72bf508b75def cwd=/etc/nixos git=/home/miguvt/.local/share/opencode/snapshot/d310466c572f92051e7d9b1b3733725e3eaa20d8/8662e97f990aad1524085c760436e71142424611
timestamp=2026-09-16T16:37:39.801Z level=INFO run=d2699f38 message="shell tool using shell" shell=/run/current-system/sw/bin/bash
timestamp=2026-09-16T16:37:39.806Z level=INFO run=d2699f38 message=init count=1
timestamp=2026-09-16T16:37:39.808Z level=ERROR run=d2699f38 message=failed ref=err_07558542 error="TypeError: undefined is not an object (evaluating 'a.name')" cause="TypeError: undefined is not an object (evaluating 'a.name')\n at resolve (/$bunfs/root/chunk-2txybz4b.js:2:1659)\n at a (/$bunfs/root/chunk-2txybz4b.js:2:936)\n at map (native:1:11)\n at <anonymous> (/$bunfs/root/chunk-2txybz4b.js:2:1626)\n at a (/$bunfs/root/chunk-2txybz4b.js:2:1166)\n at map (native:1:11)\n at <anonymous> (/$bunfs/root/chunk-2txybz4b.js:2:1626)\n at a (/$bunfs/root/chunk-2txybz4b.js:2:1166)\n at map (native:1:11)\n at <anonymous> (/$bunfs/root/chunk-2txybz4b.js:2:1390)\n at SystemPrompt.environment (/$bunfs/root/chunk-bea263sy.js:50:13096)\n at SystemPrompt.environment (definition) (/$bunfs/root/chunk-bea263sy.js:4:14254)\n at SessionPrompt.run (/$bunfs/root/chunk-bea263sy.js:50:14576)\n at SessionPrompt.run (definition) (/$bunfs/root/chunk-bea263sy.js:50:10099)\n at SessionRunState.ensureRunning (/$bunfs/root/chunk-bea263sy.js:50:14545)\n at SessionRunState.ensureRunning (definition) (/$bunfs/root/chunk-bea263sy.js:2:6720)\n at SessionPrompt.loop (/$bunfs/root/chunk-bea263sy.js:50:9849)\n at SessionPrompt.loop (definition) (/$bunfs/root/chunk-bea263sy.js:50:14481)\n at SessionPrompt.prompt (/$bunfs/root/chunk-f9g4vqca.js:6:11695)\n at SessionPrompt.prompt (definition) (/$bunfs/root/chunk-bea263sy.js:50:9462)"
Error: {
"name": "UnknownError",
"data": {
"message": "Unexpected server error. Check server logs for details.",
"ref": "err_07558542"
}
}
timestamp=2026-09-16T16:37:39.809Z level=INFO run=d2699f38 message="disposing instance" directory=/etc/nixos
miguvt@nixos /e/nixos (main) [1]>
While my config is:
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
(llama-cpp.override { cudaSupport = true; })
opencode
];
environment.sessionVariables = {
AI_MODELS_PATH = "/mnt/data/llamasrv/Models";
};
networking.firewall.allowedTCPPorts = [
8001 # llama-server
];
home-manager.users.miguvt = {
xdg.configFile."opencode/opencode.json".text = builtins.toJSON {
"$schema" = "https://opencode.ai/config.json";
"provider" = {
"local-llama" = {
"npm" = "@ai-sdk/openai-compatible";
"name" = "Local Llama Server";
"options" = {
"baseURL" = "http://127.0.0.1:8001/v1";
};
"models" = {
"qwen3.8-27b" = {
"name" = "qwen3.8-27b (local)";
};
};
};
};
"tools" = {
"bash" = true;
"edit" = true;
"write" = true;
"read" = true;
};
};
};
}
Plugins
Default
OpenCode version
1.18.30
Steps to reproduce
- Just run opencode run "hi"
Screenshot and/or share link
https://opncd.ai/share/pF86jcEq
Operating System
NixOS Unstable
Terminal
Kitty
Description
Saw lot of issues opened but no one provided logs cleanly, soo here it goes:
While my config is:
Plugins
Default
OpenCode version
1.18.30
Steps to reproduce
Screenshot and/or share link
https://opncd.ai/share/pF86jcEq
Operating System
NixOS Unstable
Terminal
Kitty