anomalyco / anomalyco/opencode

Why do write tools always fail?

Open
#38,048 1 comment 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Jul 21, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

opencode server version:

[root@ai opencode]# docker exec -it opencode bash
root@bcac45f65985:/workspace# opencode -v
1.18.3

opencode desktop version:

OpenCode Desktop
v1.18.4

Run the server in a container and expose it on port 4096.

I use OpenCode for data analysis, but it always gets stuck at the "write" stage during the final output.

Image Image

Breaking it down into smaller chapters for writing works, but it is very slow.

Dockerfile

# 使用 Python 官方镜像作为基础
FROM python:3.11-slim

# 更换 apt 源为国内镜像(加速构建)
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list.d/debian.sources \
    && sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list.d/debian.sources

# 安装系统依赖
RUN apt-get update && apt-get install -y \
    git \
    curl \
    wget \
    vim \
    nano \
    htop \
    net-tools \
    iputils-ping \
    unzip \
    zip \
    jq \
    tree \
    ripgrep \
    build-essential \
    g++ \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# ===== 安装 Node.js 和 OpenCode =====
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
    && apt-get install -y nodejs \
    && npm config set registry https://registry.npmmirror.com \
    && npm install -g opencode-ai

# ===== 安装 Python 数据分析库 =====
# 创建 requirements.txt
RUN echo 'numpy>=1.24.0\n\
pandas>=2.0.0\n\
matplotlib>=3.7.0\n\
scipy>=1.10.0\n\
scikit-learn>=1.3.0\n\
statsmodels>=0.14.0\n\
seaborn>=0.12.0\n\
openpyxl>=3.1.0\n\
pandas-datareader>=0.10.0\n\
xlrd>=2.0.0\n\
requests>=2.31.0\n\
sqlalchemy>=2.0.0\n\
pymysql>=1.0.0\n\
psycopg2-binary>=2.9.0\n\
jupyter>=1.0.0\n\
ipython>=8.0.0' > /tmp/requirements.txt

# 配置 pip 使用国内镜像并安装依赖
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
    && pip install --no-cache-dir -r /tmp/requirements.txt \
    && rm /tmp/requirements.txt

# 设置工作目录
WORKDIR /workspace

# 保持容器运行
ENTRYPOINT ["tail", "-f", "/dev/null"]
Plugins

no plugins

OpenCode version

1.18.3

Steps to reproduce

No response

Screenshot and/or share link
Image
Operating System

openEuler 22.03

Terminal

opencode desktop

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.