{
  "file": "F33-sdk-remote-client.md",
  "bullet": "Commands, server info and liveness (`F33.workspace-exec`).",
  "ids": [
    "F33.workspace-exec"
  ],
  "line": 286,
  "script": "control-agent-server exec --env PYTHONPATH=\"$F33\" --save F33.workspace-exec/probe -- .venv/bin/python - <<'PY'\nimport os\nimport time\nimport f33\nfrom openhands.sdk.workspace import RemoteWorkspace, Workspace\n\nos.makedirs(os.path.join(f33.DIR, \"exec\"), exist_ok=True)\nws = Workspace(host=f33.URL, api_key=f33.KEY, working_dir=os.path.join(f33.DIR, \"exec\"))\nassert isinstance(ws, RemoteWorkspace), type(ws)\nassert ws.alive and not RemoteWorkspace(host=\"http://127.0.0.1:9\", working_dir=\"/tmp\").alive\nr = ws.execute_command(\"echo qa-f33-out; echo qa-f33-err >&2; exit 3\", cwd=ws.working_dir)\nassert (r.exit_code, r.stdout, r.stderr, r.timeout_occurred) == (3, \"qa-f33-out\\n\", \"qa-f33-err\\n\", False), r\npwd = ws.execute_command(\"pwd\", cwd=ws.working_dir)\nassert (pwd.exit_code, pwd.stdout) == (0, ws.working_dir + \"\\n\"), pwd\nt0 = time.monotonic()\nslow = ws.execute_command(\"sleep 20\", cwd=ws.working_dir, timeout=2)\nassert (slow.exit_code, slow.timeout_occurred) == (-1, True) and time.monotonic() - t0 < 10, slow\nf33.emit(\"exec\", sha=ws.get_server_info()[\"build_git_sha\"])\nPY\ncontrol-agent-server api GET /server_info --auth none --check build_git_sha eq \"$(jq -r .sha \"$F33/exec.json\")\"\ncontrol-agent-server api GET /api/bash/bash_events/search --query kind__eq=BashCommand --query sort_order=TIMESTAMP_DESC --query limit=3 \\\n  --check items.0.command eq 'sleep 20' --check items.0.timeout eq 2 --check items.1.command eq pwd \\\n  --check items.2.command contains qa-f33-out --check items.2.cwd eq \"$F33/exec\" --save F33.workspace-exec/server-commands\ncontrol-agent-server api GET /api/bash/bash_events/search --query kind__eq=BashOutput --query sort_order=TIMESTAMP_DESC --query limit=3 \\\n  --check items.2.exit_code eq 3 --check items.2.stderr contains qa-f33-err --check items.1.exit_code eq 0 \\\n  --check items.0.exit_code eq -1 --until-ok 15 --save F33.workspace-exec/server-outputs\n",
  "exit_code": 0,
  "elapsed_ms": 53995,
  "failed_line": null,
  "failed_command": null,
  "stdout": "{\n  \"ok\": true,\n  \"exit_code\": 0,\n  \"elapsed_ms\": 35718,\n  \"stdout_tail\": \"{\\\"sha\\\": \\\"acca181af1f353975965bcf6486e1d0a58f444c0\\\"}\\n\",\n  \"stderr_tail\": \"[10/13/26 02:21:28] WARNING  Command timed out     remote_workspace_mixin.py:253\\n                             after 2 seconds                                    \\n                             (command_id=a8c2e0f9a                              \\n                             9384897aae50d7571d9de                              \\n                             0e)                                                \\n\",\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-021957-adb9-map-f33/evidence/F33.workspace-exec/probe.json\"\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"GET\",\n    \"path\": \"/server_info\",\n    \"query\": [],\n    \"auth\": \"none\",\n    \"body\": null,\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"1038\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"uptime\": 85.0,\n      \"idle_time\": 20.0,\n      \"title\": \"OpenHands Agent Server\",\n      \"version\": \"1.54.0\",\n      \"sdk_version\": \"1.54.0\",\n      \"tools_version\": \"1.54.0\",\n      \"workspace_version\": \"1.54.0\",\n      \"build_git_sha\": \"acca181af1f353975965bcf6486e1d0a58f444c0\",\n      \"build_git_ref\": \"HEAD\",\n      \"python_version\": \"3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]\",\n      \"usable_tools\": [\n        \"ClassifyAndSwitchLLMTool\",\n        \"ask_oracle\",\n        \"file_editor\",\n        \"task_tool_set\",\n        \"task\",\n        \"task_tracker\",\n        \"terminal\",\n        \"workflow_tool_set\",\n        \"workflow\",\n        \"browser_tool_set\",\n        \"edit\",\n        \"list_directory\",\n        \"read_file\",\n        \"write_file\",\n        \"glob\",\n        \"grep\",\n        \"planning_file_editor\"\n      ],\n      \"runtime_idle_timeout_seconds\": null,\n      \"conversation_runtime\": \"local\",\n      \"capabilities\": [\n        \"conversation_runtime_routes_v1\",\n        \"profile_secret_scope_v1\",\n        \"profile_persona_v1\",\n        \"credential_binding_v1\",\n        \"credential_binding_readiness_probe_v1\",\n        \"credential_binding_activation_guard_v1\",\n        \"idempotent_conversation_create_v1\",\n        \"tool_catalog_v1\",\n        \"agent_profile_draft_materialize_v1\"\n      ],\n      \"app_backend_ingress_url\": null,\n      \"max_foreground_terminal_timeout_seconds\": null,\n      \"docs\": \"/docs\",\n      \"redoc\": \"/redoc\"\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 6886,\n  \"checks\": [\n    {\n      \"check\": \"build_git_sha eq acca181af1f353975965bcf6486e1d0a58f444c0\",\n      \"ok\": true,\n      \"actual\": \"acca181af1f353975965bcf6486e1d0a58f444c0\"\n    }\n  ]\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"GET\",\n    \"path\": \"/api/bash/bash_events/search\",\n    \"query\": [\n      [\n        \"kind__eq\",\n        \"BashCommand\"\n      ],\n      [\n        \"sort_order\",\n        \"TIMESTAMP_DESC\"\n      ],\n      [\n        \"limit\",\n        \"3\"\n      ]\n    ],\n    \"auth\": \"header\",\n    \"body\": null,\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"769\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"items\": [\n        {\n          \"command\": \"sleep 20\",\n          \"cwd\": \"/workspace/verification-artifacts/runs/20261013-021957-adb9-map-f33/fixtures/qa-f33/exec\",\n          \"timeout\": 2,\n          \"id\": \"a8c2e0f9a9384897aae50d7571d9de0e\",\n          \"timestamp\": \"2026-10-13T02:21:26.149726Z\",\n          \"kind\": \"BashCommand\"\n        },\n        {\n          \"command\": \"pwd\",\n          \"cwd\": \"/workspace/verification-artifacts/runs/20261013-021957-adb9-map-f33/fixtures/qa-f33/exec\",\n          \"timeout\": 30,\n          \"id\": \"bb8073cbd842493c8a82761b0a7a8052\",\n          \"timestamp\": \"2026-10-13T02:21:26.134254Z\",\n          \"kind\": \"BashCommand\"\n        },\n        {\n          \"command\": \"echo qa-f33-out; echo qa-f33-err >&2; exit 3\",\n          \"cwd\": \"/workspace/verification-artifacts/runs/20261013-021957-adb9-map-f33/fixtures/qa-f33/exec\",\n          \"timeout\": 30,\n          \"id\": \"732441322b964c77b8fc4417da8e97be\",\n          \"timestamp\": \"2026-10-13T02:21:26.049620Z\",\n          \"kind\": \"BashCommand\"\n        }\n      ],\n      \"next_page_id\": null\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 446,\n  \"checks\": [\n    {\n      \"check\": \"items.0.command eq sleep 20\",\n      \"ok\": true,\n      \"actual\": \"sleep 20\"\n    },\n    {\n      \"check\": \"items.0.timeout eq 2\",\n      \"ok\": true,\n      \"actual\": \"2\"\n    },\n    {\n      \"check\": \"items.1.command eq pwd\",\n      \"ok\": true,\n      \"actual\": \"pwd\"\n    },\n    {\n      \"check\": \"items.2.command contains qa-f33-out\",\n      \"ok\": true,\n      \"actual\": \"echo qa-f33-out; echo qa-f33-err >&2; exit 3\"\n    },\n    {\n      \"check\": \"items.2.cwd eq /workspace/verification-artifacts/runs/20261013-021957-adb9-map-f33/fixtures/qa-f33/exec\",\n      \"ok\": true,\n      \"actual\": \"/workspace/verification-artifacts/runs/20261013-021957-adb9-map-f33/fixtures/qa-f33/exec\"\n    }\n  ],\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-021957-adb9-map-f33/evidence/F33.workspace-exec/server-commands.json\"\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"GET\",\n    \"path\": \"/api/bash/bash_events/search\",\n    \"query\": [\n      [\n        \"kind__eq\",\n        \"BashOutput\"\n      ],\n      [\n        \"sort_order\",\n        \"TIMESTAMP_DESC\"\n      ],\n      [\n        \"limit\",\n        \"3\"\n      ]\n    ],\n    \"auth\": \"header\",\n    \"body\": null,\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"752\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"items\": [\n        {\n          \"id\": \"c86c8726a6554b7ea2016aa0499f62c2\",\n          \"timestamp\": \"2026-10-13T02:21:28.178792Z\",\n          \"command_id\": \"a8c2e0f9a9384897aae50d7571d9de0e\",\n          \"order\": 0,\n          \"exit_code\": -1,\n          \"stdout\": null,\n          \"stderr\": null,\n          \"kind\": \"BashOutput\"\n        },\n        {\n          \"id\": \"dbee29d3dddc473281c7514ff2b633bc\",\n          \"timestamp\": \"2026-10-13T02:21:26.138122Z\",\n          \"command_id\": \"bb8073cbd842493c8a82761b0a7a8052\",\n          \"order\": 0,\n          \"exit_code\": 0,\n          \"stdout\": \"/workspace/verification-artifacts/runs/20261013-021957-adb9-map-f33/fixtures/qa-f33/exec\\n\",\n          \"stderr\": null,\n          \"kind\": \"BashOutput\"\n        },\n        {\n          \"id\": \"bf218439fb5140e886eaa3ab06db5618\",\n          \"timestamp\": \"2026-10-13T02:21:26.079834Z\",\n          \"command_id\": \"732441322b964c77b8fc4417da8e97be\",\n          \"order\": 0,\n          \"exit_code\": 3,\n          \"stdout\": \"qa-f33-out\\n\",\n          \"stderr\": \"qa-f33-err\\n\",\n          \"kind\": \"BashOutput\"\n        }\n      ],\n      \"next_page_id\": null\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 391,\n  \"checks\": [\n    {\n      \"check\": \"items.2.exit_code eq 3\",\n      \"ok\": true,\n      \"actual\": \"3\"\n    },\n    {\n      \"check\": \"items.2.stderr contains qa-f33-err\",\n      \"ok\": true,\n      \"actual\": \"qa-f33-err\\n\"\n    },\n    {\n      \"check\": \"items.1.exit_code eq 0\",\n      \"ok\": true,\n      \"actual\": \"0\"\n    },\n    {\n      \"check\": \"items.0.exit_code eq -1\",\n      \"ok\": true,\n      \"actual\": \"-1\"\n    }\n  ],\n  \"attempts\": 1,\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-021957-adb9-map-f33/evidence/F33.workspace-exec/server-outputs.json\"\n}\n",
  "stderr": ""
}
