You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): refresh expired agent tokens; fix --once approval hang
Address heskew's two remaining non-blocking review notes on #1553:
- `harper agent` hard-failed on an expired stored operation token instead
of self-healing via the refresh_token, unlike cliOperations.ts. Extract
the refresh logic into a shared `refreshExpiredOperationToken` helper in
cliOperations.ts and call it from both cliOperations and agentCli, so the
two transports can't drift again.
- `--once` against a real TTY drains stdin via readAllStdin() before the
first turn; if that turn then needed approval, resolveApprovals() built a
new readline on the already-ended stdin and question() never resolved.
Track actual stdin consumption (opts.stdinConsumed) instead of relying on
isTTY, and fail loudly in that case like the non-TTY path already does.
Refs #1553
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments