From fa15634381050dbdd732d0ebd5e7060e5ec6967a Mon Sep 17 00:00:00 2001 From: Alan Wizemann Date: Mon, 4 May 2026 15:33:25 +0200 Subject: [PATCH] fix(oauth-keepalive): drop unsupported --silent flag from cron create MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `hermes cron create` only accepts --name, --deliver, --repeat, --skill, --script, --workdir. The `silent: Bool?` field on HermesCronJob exists in the JSON model but isn't exposed through the CLI's create verb today — argparse rejected the unknown flag, non-zero exit, toggle failed with the generic CLI hint. Drops the flag; the keepalive runs with Hermes's default delivery. Token-refresh side effect during session boot is unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../scarf/Core/Services/OAuthKeepaliveCronService.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scarf/scarf/Core/Services/OAuthKeepaliveCronService.swift b/scarf/scarf/Core/Services/OAuthKeepaliveCronService.swift index 9b18be4..a32ddc4 100644 --- a/scarf/scarf/Core/Services/OAuthKeepaliveCronService.swift +++ b/scarf/scarf/Core/Services/OAuthKeepaliveCronService.swift @@ -81,12 +81,19 @@ final class OAuthKeepaliveCronService { @discardableResult nonisolated func enable() async -> Bool { if isEnabled() { return true } + // `hermes cron create` only accepts: --name, --deliver, + // --repeat, --skill, --script, --workdir. The `silent: Bool?` + // field on HermesCronJob is JSON-only (Hermes can write it, + // but the CLI's create verb doesn't expose a flag for it). + // Pass any unknown flag and argparse rejects the whole + // command, so stick to the supported surface and let Hermes + // pick its default delivery target — the side effect we care + // about (token refresh during session boot) fires regardless. let result = await Task.detached { [fileService] in fileService.runHermesCLI( args: [ "cron", "create", "--name", Self.jobName, - "--silent", Self.defaultSchedule, Self.defaultPrompt, ],