openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Update coding-agent prompts to reference action sandbox instead of "the workspace"

Open CodeGhost21 opened this issue 6 months ago • 0 comments

Summary

Update coding-agent prompts (code_executor, orchestrator, planner, tool_maker) to reference the action sandbox (Config.action_dir, typically ~/OpenHuman/projects) for git clones, builds, and scratch output — instead of the generic "sandboxed environment" wording inherited from before the workspace split.

Problem

#3051 acceptance criterion 5: "code_executor (and related) prompts reference the actions directory, not 'the workspace' for clones/builds."

The implementing PR #3074 changed SecurityPolicy and tool CWDs but edited zero prompt files. code_executor/prompt.md:3 still says "in a sandboxed environment" generically; grep -r 'action_dir\|actions directory' src/openhuman/agent_registry/agents/ returns nothing.

Concrete effect on the agent: when asked to clone a repo, the orchestrator prompt still steers the model toward "the workspace" mental model — so the model picks paths like ~/.openhuman/users/.../workspace/<repo>, which now hits the internal-state denylist (memory/, vault/, etc. siblings) and emits avoidable approval prompts or denials. The action sandbox at ~/OpenHuman/projects is the supported home, and prompts should say so.

Solution (optional)

  • Audit prompts under src/openhuman/agent_registry/agents/*/prompt.md and src/openhuman/agent/prompts/ for mentions of "workspace", "sandboxed environment", "working directory" without anchoring to the actual path.
  • Replace with explicit references to the action sandbox (and the ~/OpenHuman/projects default) for: cloning repos, running builds, writing scratch artifacts, and any cd-style instructions.
  • Keep internal-state references (memory, sessions, vault) clearly out of scope for these agents.
  • If prompts already templating-substitute paths, plumb Config.action_dir through; otherwise hard-code the default and document the env override.

Acceptance criteria

  • [ ] code_executor/prompt.md updated — explicit reference to the action sandbox for clones/builds.
  • [ ] Orchestrator / planner / tool_maker updated — same correction where they mention CWD or workspace.
  • [ ] No stale "the workspace" references in coding-agent prompts that contradict the actions/internal split.
  • [ ] Tests — a snapshot or grep-based assertion in prompt loader tests that catches reintroduction of stale "workspace" phrasing in coding prompts.
  • [ ] Diff coverage ≥ 80% — the implementing PR meets the changed-lines coverage gate (Vitest + cargo-llvm-cov, enforced by .github/workflows/pr-ci.yml).

Related

  • Parent issue: #3051
  • Implementing PR: #3074
  • Audit: this is gap #2 (criterion 5, "Agent prompts") — verdict NOT MET.
  • Relevant code: src/openhuman/agent_registry/agents/code_executor/prompt.md, src/openhuman/agent_registry/agents/orchestrator/, src/openhuman/agent/prompts/.

CodeGhost21 avatar Jun 02 '26 21:06 CodeGhost21