[PR #10695] feat(opencode): agent-specific instructions array #13525

Open
opened 2026-02-16 18:18:22 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10695

State: open
Merged: No


What does this PR do?

Adds ability to specify agent.<name>.instructions array that behaves like global instructions array, but only for that agent.

Example:

{
  "agent": {
    "build": {
      "instructions": [
        "~/.config/opencode/prompts/build-only.md"
      ]
    }
  }
}

Closes #10688

How did you verify your code works?

Added unit tests:

  • test/agent/agent.test.ts - Test that instructions can be set from agent config
  • test/session/system.test.ts (new file) - Tests for SystemPrompt.agent() function

All 41 tests pass.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10695 **State:** open **Merged:** No --- ### What does this PR do? Adds ability to specify `agent.<name>.instructions` array that behaves like global `instructions` array, but only for that agent. Example: ```json { "agent": { "build": { "instructions": [ "~/.config/opencode/prompts/build-only.md" ] } } } ``` Closes #10688 ### How did you verify your code works? Added unit tests: - `test/agent/agent.test.ts` - Test that instructions can be set from agent config - `test/session/system.test.ts` (new file) - Tests for `SystemPrompt.agent()` function All 41 tests pass.
yindo added the pull-request label 2026-02-16 18:18:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13525