---
id: WF-PFM-INT-014
title: 'Retry, cancel or resolve a call by hand'
trigger: The initiating executions operator starts this flow.
product_area: platform
module: integrations
revision: 1
status: draft
design_intent: confirmed
implementation_evidence: observed
origin: 'docs/milestones/INTG-M2-calls-through-the-gateway.md#Decisions M2-D5, M2-D6 (Andrew)'
inference: []
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
implements:
  - CAP-PFM-INT-011
moves:
  - STATE-PFM-INT-007
  - STATE-PFM-INT-008
crosses: []
idempotency: >-
  Retry validates the original request fingerprint; cancellation and resolution compare current execution
  status.
concurrency: >-
  The operation locks or compares the execution, so competing attempts and investigations can make a requested
  action no longer applicable.
hops:
  - 'n': 1
    actor_or_service: Executions operator
    action: Request another attempt for retrying or retryable failed work using the original input.
    anchor: 'services-platform:modules/integrations/services/executions/execution-operations.ts:retryExecution'
    seam: sync
    on_failure: 'Reject forbidden failure classes, exhausted attempts, mismatched input or another key owner.'
    left_inconsistent: The existing execution remains unchanged.
    observer: The operator
    provenance: observed
    source: 'services-platform:modules/integrations/services/executions/execution-operations.ts:retryExecution'
  - 'n': 2
    actor_or_service: Gateway
    action: 'Commit retrying status, queued continuation and the retry audit under the original execution identity.'
    anchor: 'services-platform:modules/integrations/services/executions/execution-operations.ts:retryExecution'
    seam: queue
    on_failure: Refuse an execution whose state changed during the request.
    left_inconsistent: No extra continuation commits on a lost race.
    observer: Activity
    provenance: observed
    source: 'services-platform:modules/integrations/services/executions/execution-operations.ts:retryExecution'
  - 'n': 3
    actor_or_service: Executions operator
    action: 'Cancel unattempted accepted work, or request cancellation of running asynchronous work.'
    anchor: 'services-platform:modules/integrations/services/executions/execution-operations.ts:cancelExecution'
    seam: sync
    on_failure: Refuse calls that have already settled.
    left_inconsistent: The adapter can ignore a running cancellation request and finish normally.
    observer: The operator
    provenance: observed
    source: 'services-platform:modules/integrations/services/executions/execution-operations.ts:cancelExecution'
  - 'n': 4
    actor_or_service: Executions operator
    action: Record success or failure with a note for work awaiting manual investigation.
    anchor: 'services-platform:modules/integrations/services/executions/execution-operations.ts:resolveExecution'
    seam: sync
    on_failure: Refuse every other state.
    left_inconsistent: The provider is untouched by the manual record.
    observer: Integration history
    provenance: observed
    source: 'services-platform:modules/integrations/services/executions/execution-operations.ts:resolveExecution'
  - 'n': 5
    actor_or_service: Rhythm staff
    action: Reset an identified deployment-account circuit through the staff operation and record the action.
    anchor: 'services-platform:modules/integrations/services/executions/execution-operations.ts:resetCircuit'
    seam: sync
    on_failure: Refuse a circuit that cannot be found.
    left_inconsistent: No unrelated circuit changes.
    observer: Rhythm HQ
    provenance: observed
    source: 'services-platform:modules/integrations/services/executions/execution-operations.ts:resetCircuit'
evidence:
  - >-
    services-platform at ad3f6a65: modules/integrations/services/executions/execution-operations.ts;
    aws/api/executions.routes.ts; docs/milestones/INTG-M2-calls-through-the-gateway.md (M2-D5, M2-D6)
  - 'react-console at baf6dae3: components/integrations/execution-detail.tsx'
  - >-
    services-platform:modules/integrations/tests/integration/services/executions/execution-operations.integration.spec.js#refuses
    a request handed back that is not the one recorded
  - >-
    services-platform:modules/integrations/tests/integration/services/executions/execution-operations.integration.spec.js#refuses
    a request handed back that is not the one recorded
  - >-
    services-platform:modules/integrations/tests/integration/services/executions/invoke-capability.integration.spec.js#cancels
    an accepted execution before its first attempt, releasing its key and its queued dispatch
  - >-
    services-platform:modules/integrations/tests/integration/services/executions/reconciler.integration.spec.js#lets
    an operator resolve a needs_attention execution by hand, audited, with no call to the provider
  - >-
    services-platform:modules/integrations/tests/integration/services/executions/execution-operations.integration.spec.js#lists
    every tenant’s executions that need attention, in no tenant
controls: [TC-AVL-001, TC-AVL-004, TC-AVL-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-CHG-001, TC-CHG-002, TC-CHG-003, TC-CHG-004, TC-CHG-005, TC-CHG-006, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-IAM-001, TC-IAM-002, TC-IAM-003, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-MON-001, TC-MON-002, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-VEN-001, TC-VEN-002, TC-VEN-003]
---

# Retry, cancel or resolve a call by hand

## What It Does

Operators can retry eligible calls with their original input, cancel unattempted work or request that running asynchronous work stop. Manual resolution records a provider result once investigation needs a person. Staff can also reset a circuit independently of any provider reversal.

## The Flow

```mermaid
sequenceDiagram
  participant P0 as Executions operator
  participant P1 as Gateway
  participant P2 as Rhythm staff
  P0->>P0: 1. Request another attempt for retrying or retryable failed work using the original input.
  P1->>P1: 2. Commit retrying status
  P0->>P0: 3. Cancel unattempted accepted work
  P0->>P0: 4. Record success or failure with a note for work awaiting manual investigation.
  P2->>P2: 5. Reset an identified deployment-account circuit through the staff operation and record the action.
```

## When Something Fails

Reject forbidden failure classes, exhausted attempts, mismatched input or another key owner. The existing execution remains unchanged. Refuse an execution whose state changed during the request. No extra continuation commits on a lost race. Refuse calls that have already settled. The adapter can ignore a running cancellation request and finish normally. Refuse every other state. The provider is untouched by the manual record. Refuse a circuit that cannot be found. No unrelated circuit changes.

## Open Design Questions

The separate execution-reading permission is unused. The console cannot reproduce the original request and therefore does not provide an enabled Retry action.
