You can use the compute-helper CLI to autonomously execute code and commands on a remote server.
The compute-helper path and server information are given in the
<compute_node>block of the system prompt. If not, look insidecar/bin/compute-helper.mjs.
Command Quick Reference
| Command | Purpose | When to Use |
|---|---|---|
node <helper> ssh "<cmd>" |
Execute commands remotely only | When checking the environment, viewing files, and no code changes are involved |
node <helper> sync up --cwd <root> |
Sync local code to the server | Manual sync (usually not needed,run syncs automatically) |
node <helper> run "<cmd>" --cwd <root> |
Sync code + execute remotely | When code changes need to be run on the server |
node <helper> sync down --cwd <root> --files "logs/ results/" |
Pull files back from the server | When you need to view result files |
node <helper> info |
View node configuration | When confirming connection information |
Core Behavior Rules
Rule 1: Act proactively, don't wait to be prompted
After modifying code, you must immediately run verify by remote execution; do not stop and wait for user confirmation after making changes.
❌ 错误: "我已经修改了代码,你可以运行看看。"
✅ 正确: 修改代码 → 立即 run → 分析输出 → 汇报结果
Rule 2: After failure, analyze and fix autonomously
When remote execution reports an error,immediately analyze the error output → modify the code → run again, forming a self-repair loop. Only ask the user for help when encountering a problem you cannot judge.
❌ 错误: "执行出错了,错误信息如下:..."(等用户处理)
✅ 正确: 分析错误 → 修改代码 → 再次 run → 如果还是失败 → 换策略再试
Rule 3: Probe the environment first
When operating on a remote server for the first time, first use ssh to check the environment:
which python/python3 --version— whether Python is availablenvidia-smi— GPU status (if needed)pip list | grep <package>— whether dependencies are installedls <workdir>— working directory status
Rule 4: Distinguish run vs ssh
- local code was changed → use
run(automatic sync + execution) - only want to execute a command on the server(view processes, install packages, check logs) → use
ssh - only need to sync code without executing → use
sync up
Rule 5: Single-variable changes
Modify only one variable or one aspect per iteration to make it easier to locate problems. When multiple places are changed at once and an error occurs, it is impossible to tell which change caused it.
Iteration Workflow
When the user asks to run/test/experiment on the server:
1. ssh 检查环境 ──→ 缺依赖?安装
│
2. 修改本地代码 ◄──────┘
│
3. run 远程执行 ──→ 成功?
│ ├─ 是 → 汇报结果,问下一步
│ └─ 否 → 分析错误 → 回到步骤 2
│
4. (可选) sync down 拉回结果文件
Progress Reporting
After each execution, briefly explain:
- what changes were made and why
- execution result (success/failure + key output)
- next-step plan
📊 执行结果
━━━━━━━━━━
改动: 将 batch_size 从 32 改为 64
命令: python train.py --batch_size 64
结果: ✅ 训练完成,loss 从 0.45 降到 0.32
下一步: 尝试增大学习率到 3e-4