Skip to content

Consolidate agent delegation prompt#1081

Open
aj47 wants to merge 1 commit intomainfrom
feature/1070-agent-prompt-unify
Open

Consolidate agent delegation prompt#1081
aj47 wants to merge 1 commit intomainfrom
feature/1070-agent-prompt-unify

Conversation

@aj47
Copy link
Owner

@aj47 aj47 commented Feb 20, 2026

Summary

  • merge ACP agents, personas, and internal agent into one delegation block
  • compact ACP prompt output to single-line entries
  • update system prompt construction to use unified block

Testing

  • Not run (see apps/desktop/DEBUGGING.md)

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@aj47 aj47 added the slot-1 label Feb 20, 2026
@augmentcode
Copy link

augmentcode bot commented Feb 20, 2026

🤖 Augment PR Summary

Summary: Consolidates agent delegation prompt generation into a single unified block to reduce duplication and keep delegation guidance compact.

Changes:

  • Updated ACP smart router to emit compact, per-agent delegation lines
  • Replaced separate ACP/persona/internal prompt additions with getAgentDelegationPromptAddition()
  • Adjusted system prompt construction to inject the unified delegation block in agent mode
  • Updated unit test mocks for the renamed smart-router API

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Use the delegate_to_agent tool with the agent name and a clear task description.
Monitor the agent's progress and incorporate its results into your response.
`.trim()
const summary = (def.description || def.displayName || 'External agent').trim()
Copy link

Choose a reason for hiding this comment

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

(def.description || def.displayName || 'External agent').trim() can become an empty string if the configured description/displayName is whitespace, resulting in a blank delegation entry. Consider applying the fallback after trimming so the prompt line always has a non-empty summary.

Severity: low

Other Locations
  • apps/desktop/src/main/system-prompts.ts:156

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

const info = getInternalAgentInfo()
lines.push(`- **internal**: Spawn parallel sub-agents (max depth ${info.maxRecursionDepth}, max ${info.maxConcurrent} concurrent)`)

if (lines.length === 0) {
Copy link

Choose a reason for hiding this comment

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

Because the internal agent line is always pushed (line 164), the if (lines.length === 0) branch is unreachable and the docstring about returning an empty string is currently misleading. If the intent was to sometimes omit the entire block, this logic will never do that in agent mode.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant