Skip to content

Commit 84d4ddb

Browse files
authored
Merge pull request xencon#1706 from sbadakhc/issue-1705/agent-tool-discipline
Add tool discipline section to OpenCode agent context (xencon#1705)
2 parents cf6d3a2 + 2a24fc5 commit 84d4ddb

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.opencode/agents/agent-context.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@ directory is committed to a public repository -- never store secrets.
5959
Before opening a PR, invoke the `reviewer` subagent for a read-only
6060
self-review of your branch and fix what it finds.
6161

62+
## Tool Discipline
63+
64+
Your tools are exactly: `bash`, `edit`, `glob`, `grep`, `read`, `skill`,
65+
`task`, `todowrite`, `webfetch`, `write`. Never call a tool that is not
66+
in this list.
67+
68+
- Subagents (`explore`, `general`, `reviewer`) are NOT tools -- invoke
69+
them through the `task` tool
70+
- For broad code search, use `grep` and `glob` directly
71+
- If a tool call errors, do not stop or ask an open-ended question:
72+
re-read the step you were on, pick an available tool that achieves the
73+
same goal, and continue the task
74+
- Ask the human only when the TASK is ambiguous, never because a tool
75+
failed
76+
6277
## Git Remote Configuration (Fork Workflow)
6378

6479
| Remote | URL | Purpose |

0 commit comments

Comments
 (0)