run-loop-in-dsh
After a loop is frozen, start agent-loop as DSH background bash. Use when the user asks to grind from dsh web. Do not foreground-bash the grind.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- run-loop-in-dsh
- tags
- [ "agentic_ai", "agents", "loops", "dsh" ]
- description
- After a loop is frozen, start agent-loop as DSH background bash. Use when the user asks to grind from dsh web. Do not foreground-bash the grind.
03 SKILL.md 正文
Run Agent Looper from DSH
This chat designs and freezes, then starts the harness as a background job. It is not the implementer (that is runtime in loop.json — often dsh headless).
Finish line
Shell verify via @dancingteeth/agent-looper. DSH /loop and /goal are a different product.
Do this here
- Confirm the bundle is frozen at
.cursor/loops/<name>/(GOAL.md,verify.sh,loop.json). - Confirm
pnpm exec agent-loop --helpworks (elseinstall-agent-looper). - Start one grind with bash
run_in_background: true(required). Foreground bash times out (~60s). - Tell the user the job id. Use
job_outputwhen you need logs;job_killto stop. Do not busy-poll. - Do not start a second
agent-loop runwhile one isrunning. Checkjob_listfirst.
Example bash call (schema fields, not a host terminal):
command: pnpm exec agent-loop run .cursor/loops/<name>
description: Agent Looper grind for <name>
run_in_background: true
From this repo checkout, node dist/cli/run.js .cursor/loops/<name> is equivalent if bins are missing — still run_in_background: true (foreground of that argv is also blocked).
If Doppler wraps the CLI and the directory is not scoped:
command: doppler run --project <name> --config <config> -- pnpm exec agent-loop run .cursor/loops/<name>
description: Agent Looper grind (Doppler env)
run_in_background: true
Prefer runtime: dsh in loop.json so the worker is headless DSH (this session’s DeepSeek credits / credentials-local). Unset reviewRuntime still judges on Cursor unless you set "reviewRuntime": "dsh". Do not set runtime: opencode + opencode-go/… — that model is DSH-private and standalone OpenCode cannot load it.
From dsh web, nested headless writes ~/.dsh/profiles/headless/cordis.yml (outside the workspace). Do not start the grind on workspace-write. Either:
- Ask the human to switch the session permission to Full Access, then start the grind, or
- Start the grind bash on the first call with
sandbox_permissions: danger-full-accessand a one-sentence justification (headless must write that profile).
Example (schema fields, not a host terminal):
command: pnpm exec agent-loop run .cursor/loops/<name>
description: Agent Looper grind for <name>
run_in_background: true
sandbox_permissions: danger-full-access
justification: Nested dsh --profile headless writes ~/.dsh/profiles/headless/ outside the workspace.
If the first attempt already failed with EPERM on cordis.yml or [sandbox: file access denied], retry once the same way. Do not grep credentials files. Host-terminal grinds do not need this switch.
Do not do this here
- Foreground
agent-loop run/pnpm run agent:loop/node dist/cli/run.js <loop-dir>(the companion guard blocks it) - Implement the product yourself
- Dump Doppler YAML,
doppler secrets, DSH~/.dsh/.credentials.yaml, or OpenCodeauth.json - SSH-enumerate or rsync “so the worker has context” — put paths in GOAL.md
- Repair dangling
~/.agents/skills/*/SKILL.mdfrom this chat — OpenCode boot auto-heals Cursor plugin-cache hash rotations (relink or drop)
Session caveat
Closing this DSH session cancels owned background jobs. Restarting dsh web drops in-memory jobs. Say that if the user is about to close the tab.
04 同仓库更多 Skills
hello-verify
Tiny example skill discovered via Agent Plugins skills/ layout.
run-loop-in-opencode
Install Agent Looper and start a frozen loop from OpenCode with the agent_loop_start tool. Use when the user asks to add the harness, grind, run, or implement a loop from an OpenCode session. Do not foreground-bash the grind.
review-gate
Configure Agent Looper reviewGate / REVIEWS.md. Use only when writing the judge spec.
install-agent-looper
Install the Agent Looper CLI in the current repo. Use only when `agent-loop --help` is missing. Do not dump Doppler or OpenCode secrets.
design-loop
Freeze GOAL.md + verify.sh + loop.json only. Do not implement, SSH-walk production, or dump secrets. Use when the user wants an Agent Looper for a task, or when a finished loop was still wrong and verify needs revision from export packs (still freeze-only).
review-gate
Configure Agent Looper post-verify quality review and reviewGate — Proceed / Guide / Deny / Confirm, impact-severity gating, and when not to thrash another iteration. Use when writing REVIEWS.md or tuning postQualityReview.