Always fails when running composer update. Even when rebuilding commits that used to pass

I currently get this error whenever I push to circle:

$ composer update --no-scripts
Loading composer repositories with package information
Updating dependencies (including require-dev)

Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info

                             
  [ErrorException]           
  zlib_decode(): data error  

I matched my local environment’s composer version to match circle and it works fine locally. I’ve tried adding this to the composer.json as per internet suggestions:

    "repositories": {
        "packagist": {
            "type": "composer",
            "url": "https://packagist.org"
        }
    }

our composer set up has been working for months (if not a year). There’s no change in our side that should trigger errors before it even gets to the tests.

# composer.json
{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "tymon/jwt-auth": "^0.5.5",
        "barryvdh/laravel-cors": "^0.7.2",
        "ramsey/uuid": "^3.0",
        "braintree/braintree_php" : "3.6.1",
        "doctrine/dbal": "^2.5",
        "predis/predis": "~1.0",
        "paypal/merchant-sdk-php": "3.8.*",
        "laravelcollective/html": "5.1.*",
        "intervention/image": "^2.3",
        "elasticquent/elasticquent": "dev-master",
        "sailthru/sailthru-php5-client": "^1.2"
    },
    "require-dev": {
        "fzaninotto/faker": "^1.5",
        "mockery/mockery": "0.9.*",
        "phpspec/phpspec": "~2.1",
        "codeception/codeception": "2.2.3",
        "codeception/mockery-module": "*",
        "appzcoder/crud-generator": "^1.0",
        "phpunit/phpunit": "5.4.8"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "pre-update-cmd": [
            "php artisan clear-compiled"
        ],
        "post-update-cmd": [
            "php artisan optimize"
        ],
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}
# circle.yml:
machine:
  php:
    version: 7.0.11
  hosts:
    eagle.app: 127.0.0.1
  environment:
    APP_ENV: testing
    APP_DEBUG: true
dependencies:
  pre:
    - sudo redis-server:
        background: true
    - composer install --no-scripts
    - composer dump-autoload -o
  post:
    - wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.0.tar.gz
    - tar -xvf elasticsearch-5.4.0.tar.gz
    - elasticsearch-5.4.0/bin/elasticsearch -d -E "http.port=9200"
    - sleep 5
    - sudo cp config/apache/circle.vhost.conf /etc/apache2/sites-available
    - sudo a2ensite circle.vhost.conf
    - sudo a2enmod rewrite
    - sudo a2enmod headers
    - sudo rm /etc/apache2/mods-enabled/php5.load
    - sudo service apache2 restart
    - sudo chmod 777 -Rf ~/screaming-eagle/
    - sudo cp ~/screaming-eagle/.env.example .env
    - /usr/local/bin/phantomjs --web-security=false --webdriver=4444 --remote-debugger-port=9000  --ignore-ssl-errors=true --ssl-protocol=any:
        background: true
    - sudo node resources/server.js:
        background: true
database:
  override:
    - php artisan migrate:refresh --force --seed --database=test
    - php artisan reindex --database=test
test:
  override:
    - sudo chmod 777 -Rf /home/ubuntu/screaming-eagle/storage/logs
    - touch /home/ubuntu/screaming-eagle/storage/logs/laravel.log
    - sudo chmod 777 -Rf /home/ubuntu/screaming-eagle/storage/logs
    - php artisan reindex --database=test
    - composer update -vvv
    - php vendor/bin/codecept run -vvv
    - php vendor/bin/codecept run unit -vvv
    - php vendor/bin/codecept run unit -vvv