sf agent test run fails with "RETRY" enum error during status polling
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- node.js, typescript
- Domain
- cli, testing-qa
Research direction
Start with @salesforce/agents/src/types.ts and inspect the TestStatus definition used by AgentTester.results during polling. Reproduce the documented sf agent test run --wait command, then verify that a RETRY status is handled and polling returns test results without the enum error.
Written by the indexing model from the issue text.
Description
Summary
sf agent test run --wait fails during status polling with:
INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY
Steps To Reproduce
sf agent test create --spec specs/test.yaml --api-name MyTest -o <org>sf agent test run --api-name MyTest -o <org> --wait 5 --json
Expected result
Test polls and returns results
Actual result
Crashes with RETRY enum error
Additional information
Stack trace
{
"name": "INTERNAL_SERVER_ERROR",
"message": "The specified enum type has no constant with the specified name: RETRY",
"exitCode": 1,
"context": "AgentTestRun",
"data": {
"errorCode": "INTERNAL_SERVER_ERROR",
"message": "The specified enum type has no constant with the specified name: RETRY"
},
"stack": "INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY\n at SfCommandError.from (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/SfCommandError.js:48:16)\n at AgentTestRun.catch (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/sfCommand.js:332:47)\n at AgentTestRun.catch (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-agent/lib/commands/agent/test/run.js:117:27)\n at AgentTestRun._run (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:186:29)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Config.runCommand (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:446:25)\n at async run (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:97:16)\n at async file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/bin/run.js:15:1",
"cause": "INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY\n at HttpApi.getError (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@jsforce/jsforce-node/lib/http-api.js:315:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async /opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@jsforce/jsforce-node/lib/http-api.js:127:33\n at async AgentTester.results (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/agents/lib/agentTester.js:127:25)\n at async Object.poll (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/agents/lib/agentTester.js:89:45)\n at async doPoll (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/core/lib/status/pollingClient.js:62:26) {\n data: {\n errorCode: 'INTERNAL_SERVER_ERROR',\n message: 'The specified enum type has no constant with the specified name: RETRY'\n },\n errorCode: 'INTERNAL_SERVER_ERROR'\n}",
"warnings": [],
"code": "1",
"status": 1,
"commandName": "AgentTestRun"
}
Root Cause
TestStatus type in @salesforce/agents/src/types.ts doesn't include 'RETRY':
type TestStatus = 'NEW' | 'IN_PROGRESS' | 'COMPLETED' | 'ERROR' | 'TERMINATED'
But the API returns status: "RETRY" during polling.
Impact
- Blocks ALL agent testing via CLI
- No workaround available
- Affects both stable and nightly builds
--api-versionflag doesn't help
System Information
CLI:
@salesforce/cli/2.129.2 darwin-x64 node-v20.19.3
Plugin Version:
@oclif/plugin-autocomplete 3.2.41 (core)
@oclif/plugin-commands 4.1.40 (core)
@oclif/plugin-help 6.2.38 (core)
@oclif/plugin-not-found 3.2.75 (core)
@oclif/plugin-plugins 5.4.59 (core)
@oclif/plugin-search 1.2.39 (core)
@oclif/plugin-update 4.7.23 (core)
@oclif/plugin-version 2.2.38 (core)
@oclif/plugin-warn-if-update-available 3.1.55 (core)
@oclif/plugin-which 3.2.44 (core)
@salesforce/cli 2.129.2 (core)
agent 1.32.5 (core)
apex 3.9.13 (core)
api 1.3.11 (core)
auth 4.3.1 (core)
code-analyzer 5.10.2 (user)
data 4.0.80 (core)
deploy-retrieve 3.24.16 (core)
info 3.4.111 (core)
limits 3.3.80 (core)
marketplace 1.3.10 (core)
org 5.9.72 (core)
packaging 2.25.10 (core)
schema 3.3.98 (core)
settings 2.4.60 (core)
signups 2.6.56 (user)
sobject 1.4.86 (core)
telemetry 3.8.3 (core)
templates 56.11.0 (core)
trust 3.7.114 (core)
user 3.8.0 (core)
asp 0.0.0 (link) /Users/gimli/Documents/dev/workspace/altify-qa-deployment/asp
SF ENV. VARS.
SF_AUTOUPDATE_DISABLE,true
SF_DISABLE_AUTOUPDATE,true
SF_UPDATE_INSTRUCTIONS,Use "npm update --global @salesforce/cli" to update npm-based installations.
Windows: false
Shell: zsh
Channel: stable
Diagnostics
✅ pass - salesforcedx plugin isn’t installed
❌ fail - you have at least one linked plugin
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
✅ pass - using latest or latest-rc CLI version
❌ warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
✅ pass - can access: https://test.salesforce.com
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
❌ fail - [@salesforce/plugin-auth] CLI supports v2 crypto
- Dominant language
- No language data
- Stars
- 571
- Forks
- 80
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from forcedotcom/cli
-
investigating validated
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
forcedotcom/cli#3657 · 2 comments ·
-
area:afdx owned by another team
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
forcedotcom/cli#3645 · 2 comments ·
-
bug investigating validated
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
forcedotcom/cli#3644 · 6 comments ·
-
area:afdx bug investigating owned by another team validated
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
forcedotcom/cli#3625 · 4 comments ·
-
area:afdx bug owned by another team
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
forcedotcom/cli#3608 · 2 comments ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
grafana/faro-javascript-bundler-plugins#682 ·
Maintainers usually reply within 4 days
-
kiro: every tool call in a kiro-cli --v3 / Kiro IDE session is dropped: 0 commands, 0 files, 0 editsOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area/core status/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
google-gemini/gemini-cli#29602 ·
Maintainers usually reply within 1 day
-
CLI
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
databricks/cli#6910 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day