Skip to content

fix: detect internal agents from primary system prompt only - #598

Open
LHMQ878 wants to merge 1 commit into
Opencode-DCP:masterfrom
LHMQ878:fix/581-internal-agent-detection
Open

fix: detect internal agents from primary system prompt only#598
LHMQ878 wants to merge 1 commit into
Opencode-DCP:masterfrom
LHMQ878:fix/581-internal-agent-detection

Conversation

@LHMQ878

@LHMQ878 LHMQ878 commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • Check only the primary system prompt when deciding whether a call is an internal OpenCode agent.
  • Prevent false positives when main sessions include bundled title/compaction prompts in output.system.
  • Add regression tests for injected main sessions and skipped internal agents.

Fixes #581

Test plan

  • npm test -- tests/hooks-permission.test.ts
  • npm test

Bundled internal-agent system prompts in the same API call no longer
cause DCP to skip nudge injection on main sessions.
@LHMQ878
LHMQ878 force-pushed the fix/581-internal-agent-detection branch from 0bdcb7f to e2047e2 Compare August 8, 2026 09:18
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: INTERNAL_AGENT_SIGNATURES false positive blocks nudge injection on main sessions

1 participant