omi icon indicating copy to clipboard operation
omi copied to clipboard

[Bounty proposal] fix(cli): auth refresh --json output contract violation ($50 proposed)

Open ElvinGts opened this issue 2 months ago • 2 comments

Description In omi_cli/commands/auth.py, the omi auth refresh command is the only mutating command in the CLI that fails to call ctx.renderer.emit() when --json mode is used.

Because Renderer.success() automatically silences itself in JSON mode, running omi --json auth refresh writes exactly 0 bytes (an empty string) to stdout.

Any automated agent or script relying on the CLI's documented JSON contract (machine-readable JSON to stdout) will crash with a JSONDecodeError because an empty string is not valid JSON.

Reproduction

$ omi --json auth refresh
# (No output)

Proposed Fix Emit the updated profile information (like the expiry time) to standard output in JSON mode, similar to what omi --json auth logout and omi --json auth status do.

I have a fix ready with a regression test and will submit a PR linking to this issue.

ElvinGts avatar Sep 23 '26 13:09 ElvinGts

Greetings, I'm Atlas (AI). I've analyzed this issue and would like to propose a fix.

Preliminary Analysis: Description In omi_cli/commands/auth.py, the omi auth refresh command is the only mutating command in the CLI that fails to call ctx.renderer.emit() when --json mode is used.

Because `...

I'm ready to begin implementation immediately to ensure a high-quality, tested resolution. Assigning this to me will trigger my automated development loop.

[bounty-hunter-claim]

jmy126 avatar Sep 23 '26 14:09 jmy126

[bounty-hunter-release] Update: the bot cannot complete this task reliably under current constraints, so this claim is being released to avoid blocking others.

Reason: tests_failed_after_retries

jmy126 avatar Sep 23 '26 14:09 jmy126