Skip to content

Escalation expiration - #19718

Open
deanhannigan wants to merge 31 commits into
masterfrom
feat/escalation-expiration
Open

deanhannigan wants to merge 31 commits into
masterfrom
feat/escalation-expiration

Conversation

@deanhannigan

@deanhannigan deanhannigan commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

Escalation approval duration can now be configured along with an optional auto resolution strategy.

  • Escalation Resolution - you can decide how your approvals end.
    • Expire the current default behaviour. When its time on the queue ends, it simply terminates
    • Accept request | Reject request - When its time on the queue ends, approve | reject the users request and resolve the escalation.
  • [Enterprise] Introduced is the Never expire mode. When selected, the escalation approval will only ever leave the system if its resolved or cancelled by a user.
  • [Enterprise] Custom - configure a completely bespoke duration in hours, days or weeks.

Addresses

Screenshots

You can now choose the duration in the approval modal. Seen here, the full list of options available at the enterprise level. All options outlined in the attached issue.
Screenshot 2026-09-21 at 18 18 23

Custom; hour, day and week duration. Only on the Enterprise tier.
Screenshot 2026-09-21 at 18 18 33

License Expiry Flow. Newly raised escalations will cap on the server-side to the max allowed duration in the event of a downgrade. Escalation approvals already pending will remain pending, with the full duration with which they were created.
Screenshot 2026-09-21 at 18 14 50

The resolution select. Expire will simply terminate the approval leaving the tool are resource untouched.
Screenshot 2026-09-21 at 18 18 43

Launchcontrol

Add the ability to configure approval escalation duration and auto resolution behaviour.


Summary by cubic

Adds configurable expiration to agent approval policies, with presets, custom durations, "never expires," and automatic approval or rejection when a request expires. New escalations respect a per-plan duration cap, while existing approvals keep their original expiry.

  • Adds approval expiration settings and expiry outcomes to the policy editor; omitting a duration means the policy never expires, so no expiry job is scheduled, and an outcome without a duration is rejected.
  • Caps new escalation requests at the licensed duration, shows plan-limit warnings, and clears the warning when the expiry selection changes.
  • Auto-expired approvals run the frozen tool call and complete the request, while auto-rejections mark the request rejected instead of timed out.
  • Shows a fallback summary for policies that notify recipients without named approvers, using the provider type and channel target; "DM" appears only for Slack and Teams.
  • Replaces escalation delay fields with optional duration values (seconds on policies, milliseconds on escalation docs); absence means the request never expires.
  • Moves the Duration utility into shared-core so backend-core and the builder import it from one place.

Written for commit 4e2bf40. Summary will update on new commits.

Review in cubic

@deanhannigan

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@deanhannigan I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 24 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread packages/types/src/documents/workspace/escalation.ts
Comment thread packages/server/src/api/routes/utils/validators/agent.ts Outdated
Comment thread packages/server/src/api/routes/utils/validators/agent.ts
Comment thread packages/server/src/escalation/queue.ts
Comment thread packages/shared-core/src/constants/ai.ts Outdated
Comment thread packages/server/src/escalation/queue.spec.ts Outdated
Comment thread packages/types/src/documents/global/agents.ts
@deanhannigan
deanhannigan requested a review from adrinr September 21, 2026 16:58
@deanhannigan
deanhannigan marked this pull request as ready for review September 21, 2026 17:35

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 24 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread packages/server/src/sdk/workspace/ai/agents/escalationGate.ts
Comment thread packages/server/src/sdk/workspace/ai/agents/escalationGate.ts Outdated
Comment thread packages/server/src/api/routes/utils/validators/agent.ts
Comment thread packages/server/src/escalation/queue.spec.ts
Comment thread packages/server/src/escalation/queue.spec.ts Outdated
Base automatically changed from feat/approval-core-flows to master September 22, 2026 10:44
Comment thread packages/server/src/api/routes/utils/validators/agent.ts
Comment thread packages/server/src/sdk/workspace/ai/agents/escalationGate.ts Outdated
Comment thread packages/shared-core/src/constants/escalation.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 24 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

@github-actions github-actions Bot added size/l and removed size/m labels Sep 28, 2026

This branch has not been deployed

No deployments
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.

2 participants