Skip to content

Conversation

@gabriel-ecegi
Copy link
Contributor

@gabriel-ecegi gabriel-ecegi commented Jan 30, 2026

Summary

Fixes #723prompt_append in agent overrides is ignored for Prometheus agent.

Problem

When using prompt_append in oh-my-opencode.json for Prometheus:

{
  "agents": {
    "prometheus": {
      "prompt_append": "## Custom Rules\nUse max 2 commits."
    }
  }
}

The prompt_append was ignored because config-handler.ts used shallow spread:

agentConfig["prometheus"] = { ...prometheusBase, ...prometheusOverride }

This leaves prompt_append as a separate property instead of appending it to the prompt field.

Solution

Extract prompt_append from the override and explicitly append it to the base prompt:

const { prompt_append, ...restOverride } = prometheusOverride;
const merged = { ...prometheusBase, ...restOverride };
if (prompt_append && merged.prompt) {
  merged.prompt = merged.prompt + "\n" + prompt_append;
}

Changes

  • src/plugin-handlers/config-handler.ts: Handle prompt_append properly for Prometheus
  • src/plugin-handlers/config-handler.test.ts: Add test verifying prompt_append is appended

Testing

  • All 12 existing tests pass
  • New test verifies prompt_append content appears at end of prompt
  • Typecheck passes

Related


Summary by cubic

Properly appends prompt_append from Prometheus agent overrides to the base prompt instead of ignoring it. Fixes #723 and ensures custom rules appear at the end of the final prompt.

  • Bug Fixes
    • Extracts prompt_append from the override and appends it to merged.prompt.
    • Replaces shallow spread that discarded prompt_append.
    • Adds a test to confirm base prompt is preserved and ends with the custom instructions.

Written for commit 2094b33. Summary will update on new commits.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@gabriel-ecegi gabriel-ecegi force-pushed the fix/prometheus-prompt-append-v2 branch from efd60ce to 074124e Compare January 30, 2026 05:13
@gabriel-ecegi
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 30, 2026
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@gabriel-ecegi gabriel-ecegi force-pushed the fix/prometheus-prompt-append-v2 branch from 074124e to 899bf18 Compare January 30, 2026 16:31
- Extract prompt_append from override and append to prompt instead of shallow spread
- Add test verifying prompt_append is appended, not overwriting base prompt
- Fixes code-yeongyu#723
@gabriel-ecegi gabriel-ecegi force-pushed the fix/prometheus-prompt-append-v2 branch from 899bf18 to 2094b33 Compare January 31, 2026 06:24
@code-yeongyu code-yeongyu merged commit ffbca5e into code-yeongyu:dev Feb 1, 2026
2 checks passed
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.

[Bug]: oh-my-opencode.json tools and permissions agent overrides not working as expected.

2 participants