Skip to content

Handle a modification halt (exit 4)

Retraining a model, changing what it is for, or extending what it can do can make you the provider of a changed system under Article 25. When you tell check about such a change, it stops the release: exit 4, a HALTED_PENDING_REVIEW state, and no Annex IV dossier until a person signs off. This guide walks through the whole loop on 0.17.0.

1. Declare the change

Pass the reason for this release with --change-context. A recognised value is model_retrain, purpose_change or capability_extension; any other value changes nothing.

Bash
opencomplai check --manifest system-manifest.json --change-context model_retrain
echo "exit $?"
PowerShell
opencomplai check --manifest system-manifest.json --change-context model_retrain
"exit $LASTEXITCODE"

You should see:

Text Only
System support-bot HALTED_PENDING_REVIEW (trap_detected). 'opencomplai docs
generate' is blocked until 'opencomplai resume --approval-token …'.

Opencomplai Compliance Check
  result:       TRAP_DETECTED
  failed_controls: EU_AIA_ART25_MODIFICATION_TRAP
exit 4

In CI, add --change-context model_retrain through the GitHub Action's args input (args: --change-context model_retrain) or through OPENCOMPLAI_CHECK_ARGS for the connector scripts, for the release that needs it. Leave it out for ordinary runs.

While the system is halted, opencomplai docs generate --system-id <id> refuses and exits 4, and no dossier is written. There is no override flag.

2. Do the provider work

The halt is the tool's way of saying a person must decide. Complete the obligations for the modified system (a fresh conformity assessment, updated technical documentation) before you approve. Run opencomplai gaps to see where the documentation stands; see Fix a failed check.

3. Approve

A named person mints a signed approval token. Save it as JSON so you can keep it in a file:

Bash
opencomplai approve --system-id support-bot --approver lead@example.com -o json > approval.json
jq -r .token approval.json > token.txt
PowerShell
opencomplai approve --system-id support-bot --approver lead@example.com -o json |
  Out-String | ConvertFrom-Json | ForEach-Object { $_.token } | Set-Content -NoNewline token.txt

The token is bound to this halt, signed with your key from opencomplai init, and written to the signed oversight log. If your manifest declares human_oversight roles, add --role <role>. approve exits 2 when the system is not halted.

4. Resume

Bash
opencomplai resume --system-id support-bot --approval-token @token.txt
PowerShell
opencomplai resume --system-id support-bot --approval-token "@token.txt"
Text Only
System support-bot resumed to RUNNING (approved by lead@example.com).

An invalid, edited or older token exits 2 and the system stays halted. Then opencomplai docs generate --system-id support-bot --manifest system-manifest.json writes the dossier again.

5. Make the check pass for this change

resume unfreezes the system. It does not change what check --change-context model_retrain reports, which is still exit 4 for that flag. To let that release through, record a trap approval together with a classification acceptance for the same change:

Bash
opencomplai accept --manifest system-manifest.json --accepted-by "Jane Doe" \
  --statement "We reviewed the classification."
opencomplai accept --manifest system-manifest.json --accepted-by "Jane Doe" \
  --statement "Retrained on 2026 data; conformity assessment redone." \
  --trap-approval --change-context model_retrain
git add .opencomplai/acceptances
PowerShell
opencomplai accept --manifest system-manifest.json --accepted-by "Jane Doe" --statement "We reviewed the classification."
opencomplai accept --manifest system-manifest.json --accepted-by "Jane Doe" --statement "Retrained on 2026 data; conformity assessment redone." --trap-approval --change-context model_retrain
git add .opencomplai/acceptances

With both records committed, exit 4 is replaced by the accepted-path result and the system is not halted: check exits 0 when no EU AI Act article is Missing, and exits 1 listing the Missing article ids (for example Art. 9, Art. 13) otherwise. Close those with Fix a failed check. An approval alone, without the acceptance, is not honoured. The full matrix is in Exit codes.

See also