Skip to content

jetbrains: Copilot Agent terminated unexpectedly. Exit code: null #35

@pbek

Description

@pbek

Thank you very much for the NixOS MCP!
When trying mcp-nixos in PhpStorm or Clion in NixOS via GitHub copilot, using this msp.json config:

{
    "servers": {
        "nixos": {
            "command": "nix",
            "args": ["run", "github:utensils/mcp-nixos", "--"]
        }
    }
}

I get an error:

Copilot Agent terminated unexpectedly. Exit code: null

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: java.lang.RuntimeException: Copilot Agent terminated unexpectedly. Exit code: null
	at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:111)
	at com.github.copilot.util.LoggerUtil.errorAndSecureTelemetry(LoggerUtil.java:36)
	at com.github.copilot.lang.agent.RestartableCopilotAgentProcessService$BaseDelegateImplementation.onRestartException(RestartableCopilotAgentProcessService.java:258)
	at com.github.copilot.lang.agent.CopilotAgentProcessServiceImpl.handleAgentExceptionLocked(CopilotAgentProcessServiceImpl.java:349)
	at com.github.copilot.lang.agent.CopilotAgentProcessServiceImpl.lambda$executeCommandWithPromise$4(CopilotAgentProcessServiceImpl.java:380)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException: Copilot Agent terminated unexpectedly. Exit code: null
	... 8 more
Caused by: java.io.IOException: Stream closed
	at java.base/java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:447)
	at java.base/java.io.OutputStream.write(OutputStream.java:167)
	at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:125)
	at java.base/java.io.BufferedOutputStream.implFlush(BufferedOutputStream.java:252)
	at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:246)
	at com.github.copilot.lang.agent.vscodeRpc.VSCodeJsonRpc.sendBytes(VSCodeJsonRpc.java:77)
	at com.github.copilot.lang.agent.vscodeRpc.VSCodeJsonRpc.sendCommand(VSCodeJsonRpc.java:38)
	at com.github.copilot.lang.agent.CopilotAgentProcessServiceImpl.lambda$executeCommandWithPromise$4(CopilotAgentProcessServiceImpl.java:377)
	... 5 more
Image

I was running nix run github:utensils/mcp-nixos -- manually once to get the cache "warm".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions