Hi Colab CLI team,
I have been using google-colab-cli==0.5.9 heavily from terminal-based coding agents on a Colab Pro+ account. The tool is very useful, but a few missing surfaces make it harder for agents and automation to
use safely and predictably.
Environment
- Package:
google-colab-cli==0.5.9
- Install:
uv tool install google-colab-cli
- Platform: Linux
- Account: Colab Pro+
- Commands used:
colab run, colab new, colab sessions, colab status
Observations
1. High-memory / machine shape cannot be selected from the CLI
The Colab web UI exposes high-memory choices for some runtimes, for example CPU-only, T4, and A100.
In the installed CLI source, client.py defines:
Shape.STANDARD
Shape.HIGH_RAM
and listed assignments expose machineShape.
But colab new and colab run only expose:
and assignment creation appears to send only variant and accelerator, not machine shape.
This makes it impossible to request high-memory CPU/T4/A100 from the CLI, even though the web UI supports it.
Request:
- Add a shape option, for example:
--high-mem
- or
--shape standard|high-ram
- Show shape in
colab status and colab sessions.
2. CU/hour rate is not exposed through the CLI
For automation, it is important to know the active runtime’s current compute-unit usage rate before starting long jobs.
Currently I could not find a CLI command that reports:
- current CU/hour for an active runtime
- remaining compute units / balance
- estimated runtime cost
The web UI shows approximate usage rates, but terminal agents cannot safely read that.
Request:
- Add current runtime CU/hour to
colab status.
- Optionally add account balance / compute-unit info if available.
- If exact values are not available, expose the same approximate values shown in the Colab UI.
3. Allocation failures for scarce GPUs are raw and hard to automate
For scarce accelerators like G4, A100, and H100, allocation can return Service Unavailable.
Example pattern:
ColabRequestError: Failed to issue request POST
https://colab.research.google.com/tun/m/assign?...&variant=GPU&accelerator=H100: Service Unavailable
Observed behavior:
- T4 allocated on first attempt.
- L4 allocated on first attempt.
- G4 allocated after several retries.
- A100 allocated after several retries.
- H100 did not allocate after many retry attempts.
Request:
-
Convert allocation failures into concise, machine-readable output.
-
Consider an optional retry/backoff mode:
- colab run --gpu H100 --retry 80 --retry-delay 20 ...
- or colab new --gpu H100 --wait --timeout ...
-
Return structured reason codes where possible: quota, entitlement, temporary_unavailable, capacity, etc.
4. CLI selector does not guarantee actual assigned hardware details
The selector is useful, but agents need to know what was actually assigned.
Examples from one Pro+ account:
- --gpu G4 assigned NVIDIA RTX PRO 6000 Blackwell Server Edition, ~98 GB VRAM.
- --gpu A100 assigned NVIDIA A100-SXM4-40GB.
- The web UI also showed an A100 high-memory option with NVIDIA A100-SXM4-80GB.
Request:
- Include actual assigned hardware details in colab status:
- GPU model
- GPU memory
- driver / CUDA if available
- TPU device kind
- TPU HBM/device memory
- CPU/RAM shape
- disk size
- machine shape
5. Better cleanup / interruption ergonomics for automation
For long retry loops or agent-driven workflows, a user interrupt can leave uncertainty about local wrapper processes or remote assignments.
Request:
- Provide a single cleanup command or mode that stops a named session and confirms server-side assignment state.
- Consider clearer documentation for interruption behavior and keep-alive behavior.
Why this matters
AI coding agents increasingly run workloads from terminals. For Colab CLI to be reliable in that setting, agents need to:
- request the right shape,
- estimate cost before long jobs,
- retry scarce accelerators safely,
- verify actual assigned resources,
- and clean up confidently after interruption.
These improvements would make the CLI much safer for automated ML workflows.
Thanks for building this tool.
Hi Colab CLI team,
I have been using
google-colab-cli==0.5.9heavily from terminal-based coding agents on a Colab Pro+ account. The tool is very useful, but a few missing surfaces make it harder for agents and automation touse safely and predictably.
Environment
google-colab-cli==0.5.9uv tool install google-colab-clicolab run,colab new,colab sessions,colab statusObservations
1. High-memory / machine shape cannot be selected from the CLI
The Colab web UI exposes high-memory choices for some runtimes, for example CPU-only, T4, and A100.
In the installed CLI source,
client.pydefines:Shape.STANDARDShape.HIGH_RAMand listed assignments expose
machineShape.But
colab newandcolab runonly expose:--gpu--tpuand assignment creation appears to send only
variantandaccelerator, not machine shape.This makes it impossible to request high-memory CPU/T4/A100 from the CLI, even though the web UI supports it.
Request:
--high-mem--shape standard|high-ramcolab statusandcolab sessions.2. CU/hour rate is not exposed through the CLI
For automation, it is important to know the active runtime’s current compute-unit usage rate before starting long jobs.
Currently I could not find a CLI command that reports:
The web UI shows approximate usage rates, but terminal agents cannot safely read that.
Request:
colab status.3. Allocation failures for scarce GPUs are raw and hard to automate
For scarce accelerators like G4, A100, and H100, allocation can return
Service Unavailable.Example pattern:
ColabRequestError: Failed to issue request POST
https://colab.research.google.com/tun/m/assign?...&variant=GPU&accelerator=H100: Service Unavailable
Observed behavior:
Request:
Convert allocation failures into concise, machine-readable output.
Consider an optional retry/backoff mode:
Return structured reason codes where possible: quota, entitlement, temporary_unavailable, capacity, etc.
4. CLI selector does not guarantee actual assigned hardware details
The selector is useful, but agents need to know what was actually assigned.
Examples from one Pro+ account:
Request:
5. Better cleanup / interruption ergonomics for automation
For long retry loops or agent-driven workflows, a user interrupt can leave uncertainty about local wrapper processes or remote assignments.
Request:
Why this matters
AI coding agents increasingly run workloads from terminals. For Colab CLI to be reliable in that setting, agents need to:
These improvements would make the CLI much safer for automated ML workflows.
Thanks for building this tool.