TL;DR: This multi-action Wrike AI agent automatically tracks how many times a task is sent back for review by incrementing a numeric “Revision Count” custom field and posting a short comment each time a task enters a selected review status. It gives you dashboard-ready data on revision cycles, replaces manual tracking or external integrations, and is fully customizable to your workflow (field name, trigger status, and comment format).
Hello Community! 👋
We’re thrilled to share a Stale Task Escalation Agent (agent chaining pattern) that automatically detects stale work, escalates it, and notifies the right person, all natively in Wrike using multiple agents that trigger each other ⚙️
Below, you’ll find the complete configuration, prompts, setup instructions, and customization tips so you can adapt this pattern to your own SLA/escalation workflows ✔️
Agent Goal / Use Case
Automatically detect tasks that have been “stuck” too long in certain statuses, escalate them by changing the task status, and notify a project manager with a comment without manual monitoring or external tools.
Typical scenario:
Approvals, reviews, or blocked tasks sit for days (or weeks) before anyone notices. By the time someone realizes, it’s urgent and requires a fire drill.
Example: “Legal reviews can sit for weeks. We need automated escalation when approval time exceeds our SLA.”
This agent chain solves that by:
- Scanning for stuck tasks on a schedule.
- Flagging stale tasks via a custom field.
- Escalating their status automatically.
- Notifying the project manager via comment.
Time Saved: ~3–5 hours/week per manager (no more manual dashboard checks or chasing overdue items)
How It Works
This pattern uses three simple agents chained together:
- Agent 1 (Stale Detector) - Scheduled daily, finds stuck tasks, sets “Stale” field to “Yes”.
- Agent 2 (Escalator) - Triggered by field change, changes status to “Escalated”.
- Agent 3 (Notifier) - Triggered by status change, posts comment @mentioning project manager.
Why three agents?
- Each agent does one thing (detect → escalate → notify).
- Easier to test and debug each step.
- Highly composable: you can swap out detectors, escalation rules, or notification logic independently.
Prerequisites
Before setting up the agents, you’ll need:
Custom Field: “Stale”
- Type: Dropdown (single-select)
- Values: "Yes", "No" (or "Yes" plus blank as default)
- Make sure it’s added and visible in the space/folder/project where the agents will run
Workflow Status: “Escalated” (or similar)
- Add an “Escalated” / “Needs Attention” type status to your task workflow
- This is the status that indicates a task has been formally escalated
Agent 1: Stale Detector
This agent runs daily, scans for stuck tasks, and marks them as stale.
Configuration:
Setting | Value |
|---|
Name | Stale Detector |
Scope | Any subitem of the item where the agent was added |
Trigger | Scheduled - Daily at 9:00 AM |
Action | Change custom field |
Prompt:
General instructions:
You are a Stale Task Detector.
Mark tasks as stale when they've been stuck too long.
=== RULES ===
Check tasks in "Pending Approval" status.
If in that status for more than 5 days → mark as stale.
Action:
=== ACTION ===
Set "Stale" field to "Yes".
=== SKIP ===
- Tasks where status changed in last 24 hours
- Tasks already marked Stale = Yes
Agent 2: Escalator
This agent responds when a task is marked stale and changes its status.
Setting | Value |
|---|
Name | Stale Escalator |
Scope | Any subitem of the item where the agent was added |
Trigger | Custom field changed - “Stale” |
Action | Change status |
Prompt:
General instructions:
You are a Stale Task Escalator.
When "Stale" field changes to "Yes" and status is "Pending Approval", change status to "Escalated".
=== SKIP ===
Don't change status if task is already "Completed", "Cancelled", or "Escalated"
Action:
Change Status
Agent 3: Escalation Notifier
This agent posts a comment when a task is escalated, notifying the project manager.
Setting | Value |
|---|
Name | Escalation Notifier |
Scope | Any subitem of the item where the agent was added |
Trigger | Status changed - to “Escalated” |
Action | Post comment |
Prompt:
General instructions:
You are an Escalation Notifier.
When status changes to "Escalated", post a comment to notify the project manager.
Action:
=== ACTION ===
Post comment:
"⚠️ This task has been escalated due to extended time in approval. Please review and help unblock."
Note: Configure the @mention in the comment action parameters when setting up the agent. Select the project manager to notify.
The Complete Chain
Agent 1: Stale Detector (Scheduled daily)
Action: Sets "Stale" field to "Yes"
Triggers 👇
Agent 2: Escalator (Field change trigger)
Action: changes status to "Escalated"
Triggers 👇
Agent 3: Notifier (Status change trigger)
Action: Posts comment @mentioning PM
Step-by-Step Setup
Step 1: Create the Custom Field
- Go to Space Settings → Custom Fields
- Create new dropdown (Single select) field named “Stale”
- Add values: “Yes”, “No”
- Save
Step 2: Add Escalation Status (if needed)
- Go to Space Settings → Workflows
- Edit your task workflow
- Add status “Escalated” (or similar)
- Save
Step 3: Deploy Agent 1 (Stale Detector)
- Go to Space Settings → AI Agents
- Click “+ Custom AI agent”
Configure:
- Name: Stale Detector
- Scope: Any subitem of the item where the agent was added
- Trigger: Scheduled → Daily → 9:00 AM
- Action: Change custom field → “Stale”
- Paste and customize the prompt
- Test in Playground with sample tasks
- Appoint to your target folder/project
Step 4: Deploy Agent 2 (Escalator)
- Click “+ Custom AI agent” again
Configure:
- Name: Stale Escalator
- Scope: Any subitem of the item where the agent was added
- Trigger: Custom field changed → “Stale”
- Action: Change status
- Paste and customize the prompt
- Test in Playground
- Appoint to the SAME folder/project as Agent 1
Step 5: Deploy Agent 3 (Notifier)
- Click “+ Custom AI agent” again
Configure:
- Name: Escalation Notifier
- Scope: Any subitem of the item where the agent was added
- Trigger: Status changed → “Escalated”
- Action: Post comment
- Paste and customize the prompt (update project manager name)
- Test in Playground
- Appoint to the SAME folder/project as Agents 1 and 2
Step 6: Verify the Chain
- Find a task that should be stale (or create a test task)
- Manually set it to “Pending Approval” status with an old date
- Wait for Agent 1’s scheduled run (or trigger manually in Playground)
- Verify “Stale” field changes to “Yes”
- Verify Agent 2 triggers and changes status to “Escalated”
- Verify Agent 3 triggers and posts comment @mentioning project manager
Customization Examples
For Approval Workflows
Monitor these statuses:
- "Pending Approval" - stale after 5 days
- "Legal Review" - stale after 7 days
- "Executive Sign-off" - stale after 3 days
Escalation status: "Approval Overdue"
For Creative/Agency Teams
Monitor these statuses:
- "Client Review" - stale after 5 days
- "Waiting for Assets" - stale after 7 days
- "Pending Feedback" - stale after 3 days
Escalation status: "At Risk"
For IT/Support Teams
Monitor these statuses:
- "Waiting on Vendor" - stale after 10 days
- "Pending Info" - stale after 3 days
- "On Hold" - stale after 14 days
Escalation status: "Needs Attention"
Expected Results
Immediate Impact:
- Stuck tasks get flagged automatically
- No items slip through the cracks
- Consistent SLA enforcement
Team Benefits:
- Managers don’t waste time hunting for overdue items
- “Escalated” status creates dashboard visibility
- Clear signal that something needs attention
Organizational Benefits:
- Faster resolution of stuck work
- Data on where bottlenecks occur (which statuses, how often)
- Reduced fire drills from late discovery
Troubleshooting
Agent 1 not marking tasks as stale:
- Verify status names match exactly (case-sensitive).
- Check that tasks have been in status long enough.
- Confirm agent can see tasks in the folder (permissions).
Agent 2 not triggering:
- Verify it’s watching the “Stale” field specifically.
- Check that both agents are appointed to the same location.
- Confirm Agent 1 is actually changing the field (check Activity Dashboard).
Agent 3 not commenting:
- Verify it’s watching for status change to “Escalated” specifically.
- Check that all three agents are appointed to the same location.
- Confirm Agent 2 is actually changing the status.
Chain feels slow:
- Agent 2 triggers within seconds of Agent 1’s field change.
- If Agent 1 is scheduled for 9 AM, the full chain completes by 9:01 AM.
- For faster detection, increase Agent 1’s schedule frequency.
Too many escalations:
- Increase the staleness thresholds.
- Add more exclusions (certain folders, certain statuses).
- Check that the 24-hour grace period is working.