huaweicloud_sandbox_exec_with_session
Execute a command on a workspace terminal with session reuse (state persists across calls). Shell state (cd, env vars, aliases) carries over between calls. Use for interactive work and command sequences that need shared state. NOT for long-running commands (>30s) — prefer exec_one_shot for those.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The shell command to execute on the remote workspace | |
| username | No | Login username for the remote terminal (default: root) | |
| timeout_ms | No | Execution timeout in milliseconds (default: 120000) | |
| workspace_id | No | Workspace ID from huaweicloud_sandbox_connect return value. Required - must be passed explicitly when HW_WORKSPACE_ID is not set. |