Skip to content

feat: add wait support for instance and tool#82

Draft
jo-hnny wants to merge 2 commits into
TencentCloudAgentRuntime:mainfrom
jo-hnny:codex/issue-72-wait
Draft

feat: add wait support for instance and tool#82
jo-hnny wants to merge 2 commits into
TencentCloudAgentRuntime:mainfrom
jo-hnny:codex/issue-72-wait

Conversation

@jo-hnny

@jo-hnny jo-hnny commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a shared stable-state waiter for Instance and Tool lifecycle commands
  • expose --wait on Instance create/get/pause/resume/update and Tool create/fork/get/update
  • poll explicit transitional states every 5 seconds with a 10-minute timeout, returning the final GET resource once a known stable state is reached
  • reject unknown statuses with WAIT_UNKNOWN_STATUS and preserve mutation response metadata

State handling

  • Instance transitional states: STARTING, PAUSING, STOPPING
  • Instance stable states: RUNNING, PAUSED, STOPPED, FAILED, STARTING_FAILED, STOPPING_FAILED, PAUSE_FAILED, RESUME_FAILED
  • Tool transitional states: CREATING, DELETING
  • Tool stable states: ACTIVE, FAILED, ISOLATED

Failure-like stable states are returned as the settled resource. --wait indicates that the resource has left a transitional state; it does not reinterpret the backend lifecycle result.

Delete and list commands intentionally do not expose --wait. For delete, the command does not have a final resource to return consistently after deletion.

Validation

  • env GOCACHE=/private/tmp/ags-cli-gocache go test ./...
  • command help and generated-schema characterization tests cover where --wait is exposed and excluded

Closes #72

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add --wait for Instance and Tool lifecycle transitions

1 participant