A secret scanner is right often enough to keep and wrong often enough to annoy you. The sample curl command in your API docs has an Authorization header in it, the scanner can't tell it from a real one, and the agent's whole change stops at the commit. 1904 already holds a possible secret at the commit, the push and the merge. What's changed is what happens next, so a false alarm costs you a minute and a real key still doesn't get through.
The agent looks first
When a submit is stopped by the scan, 1904 sends the flagged files and lines to the task's agent, never the values, and asks it to check each one. Example or test data gets a gitleaks:allow comment on its line, so the submit carries on by itself. A real key, token or password comes out of the code and is read from an environment variable instead. When a secret is sitting in a commit that hasn't been pushed yet, the agent fixes the file and 1904 folds those unpushed commits together with the fix, so the push doesn't publish the key from an earlier commit. Most of the time you don't hear about any of it.
When it comes back to you
If the same findings come back after the agent has tried, the submit pauses and you get a notification that possible secrets need your review. The screen it opens, Review flagged secrets, lists each file and line with the rule that matched, and says that values are never shown. Ask agent to inspect & fix sends the agent back with a note of your own, such as these are example curl docs, mark them safe, or use the environment variable we already have. Asking resumes the submit when the agent finishes. Open agent chat shows what it found the first time, Recheck changes runs the scan again, and Pause submission keeps the work without submitting.
Confirming a false alarm
Sometimes you know at a glance the lines are harmless and don't want the code touched. Tick I confirm these flagged lines do not contain real credentials or private secrets that must stay out of Git, then Attest & continue. That lets this exact version through without changing any files. It covers only that version: if the agent edits anything afterwards, the new change is scanned again from scratch. The same screen appears when a commit or a push you started yourself is refused, with Cancel in place of Pause submission.
If the key was in your prompt
Agents get keys the obvious way, because someone pasted one into the conversation. When the agent reports that a real credential appeared in your prompt, the review screen shows Rotate credential from prompt and names which one, never its value. Removing it from the code doesn't take it out of the conversation, so change it with its provider.