Asana custom field GIDs are long numeric strings. When you pass them as nested keys in HTTPie’s bracket syntax, HTTPie sees a numeric key and assumes you’re building an array, then tries to allocate memory up to that index. With a 16-digit GID, that’s enough to OOM the process.
This breaks:
https --session pat PUT https://app.asana.com/api/1.0/tasks/1208765432100001 \
data[custom_fields][1205432109876543]="1205432109876544"
HTTPie reads 1205432109876543 as an array index and tries to build a sparse array
of that size. It never gets to make the request.
The fix is to bypass the bracket syntax entirely and pass the custom fields as a raw
JSON object using HTTPie’s := operator:
https --session pat PUT https://app.asana.com/api/1.0/tasks/1208765432100001 \
data[custom_fields]:='{"1205432109876543":"1205432109876544"}'
:= tells HTTPie the value is already JSON: no parsing, no array inference, no OOM.
Works for any nested structure where the keys are numeric strings rather than integers.