Skip to content

feat(opencode): agent-specific instructions array - #10695

Closed
marchellodev wants to merge 1 commit into
anomalyco:devfrom
marchellodev:agent-specific-instructions-array
Closed

marchellodev wants to merge 1 commit into
anomalyco:devfrom
marchellodev:agent-specific-instructions-array

Conversation

@marchellodev

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my searches, I found one potentially related PR:

feat(agent): support appending to agent prompts via config (PR #7310)

  • This PR deals with agent-specific prompt configuration, which is similar in scope to the current PR that adds agent-specific instructions array

This PR appears to address a related but slightly different feature - appending to agent prompts via config - while PR #10695 adds the ability to specify an instructions array per agent. They may share similar implementation patterns or config structure, making it worth reviewing for any overlap or consistency concerns.

Otherwise, no exact duplicate PRs were found for the agent-specific instructions array feature.

@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Agent-specific instructions array

1 participant