fix(cron): fall back to a local schedule when Cloud cannot reach this computer - #3682
Merged
Conversation
cpacker
requested review from
4shub,
carenthomas,
christinatong01,
jnjpng,
kl2806 and
sarahwooders
as code owners
August 5, 2026 01:10
This was referenced Aug 5, 2026
cpacker
changed the base branch from
main
to
refactor/defer-cron-detail-to-skill
August 5, 2026 01:58
cpacker
force-pushed
the
fix/cron-local-clock-fallback
branch
2 times, most recently
from
August 5, 2026 02:07
707f3fa to
e56e6b0
Compare
… computer Bare `letta cron add` from a desktop-local or unregistered runtime errored after #3665, leaving the most common interactive environments with no no-flags path. Cloud scheduling has no wire to deliver into those runtimes (they are not in the environments registry), so the locality-preserving placement is the local scheduler: the schedule is stored in ~/.letta/crons.json with a warning explaining the durability tradeoff, and recurring schedules get a louder caution since "every Monday" pinned to a session is usually not what the user meant. Also rewrites the scheduling-tasks skill around intention (omit the flags; the CLI preserves execution locality so follow-ups never race the active conversation from a second environment), adds the fast-followup vs recurring-job guidance, documents UTC conversion for Cloud cron expressions, and folds in the CLI reference corrections from #3675 (--once, id-or-name lookup, runs history, --every UTC semantics, no in-place editing). Co-Authored-By: Cameron <cameron@pfiffer.org> 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
The skill and system prompts explained the CLI's placement rules by
enumerating runtime types (external listener on a VPS/Railway box,
managed sandbox, desktop-local session). That taxonomy is implementation
detail that will churn; the durable guidance is the decision rule: omit
the flags (work stays on the computer that created it), override only
for a requirement (fire-regardless -> --runner cloud, specific computer
-> --computer), and read the CLI output warning when placement is local.
Also plain-languages the user-facing fallback messages ("not connected
to your Letta account" instead of "not a registered Cloud environment").
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>
cpacker
force-pushed
the
fix/cron-local-clock-fallback
branch
from
August 5, 2026 02:17
e56e6b0 to
0bb3569
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
letta cron addon a desktop-local or unregistered runtime now creates a local schedule with a warning, instead of erroring. After fix(cron): preserve active listener execution by default #3665, those runtimes had no working no-flags path: Cloud scheduling cannot deliver into a computer that is not in the environments registry, so the local scheduler is the only placement that keeps the work executing where the conversation lives.--runner cloud,--computer <deviceId>) spelled out.scheduling-tasksskill around intention rather than the flag matrix: omit--runner/--computerand the CLI keeps the schedule on the computer that created it, so scheduled work never conflicts with the active conversation from a second computer. Adds fast-followup vs recurring-job guidance and UTC-conversion instructions for cloud cron expressions (agents were previously shown examples that would silently schedule 9am UTC for a user asking for 9am local).--once, id-or-name forget/delete(+removealias),runshistory,--everycompiling to a UTC cron expression on cloud schedules, numeric-only cron fields, and no in-place editing. Cameron is co-authored for those.Stacked on #3683 (system prompts defer cron mechanics to the skill), so this PR touches only code and the skill — the skill is the single place placement behavior is documented.
Resulting default (no flags, cloud agent)
Explicit flags stay authoritative and unchanged:
--computerpicks a registered device,--runner cloudpicks the sandbox,--runner localpins this computer.Implementation
resolveInferredTargetDevicenow returnsdevice | cloud-sandbox | local-fallback(the error arm is gone);handleAddrouteslocal-fallbackto the local runner and threads the reason into the JSON output'swarningfield, merged with the existing no-scheduler-running warning when both apply. User-facing messages use plain wording ("not connected to your Letta account"), and guidance text avoids runtime taxonomy — the CLI reports its placement in output, and the skill teaches reading that instead of predicting it.Follow-up (separate track): registering desktop-local listeners in the Cloud environments registry would let those runtimes get durable Cloud schedules targeting the desktop, at which point this fallback narrows naturally. Until then, local is the honest placement.
Supersedes #3675.
Test plan
bun test src/cli/subcommands/cron.test.ts src/cli/subcommands/cron-runner.test.ts src/tools/shell-env.test.ts— includes new HTTP-boundary tests: unregistered runtime creates a local task (no schedule POST) with fallback + recurring warnings; one-shot fallback omits the recurring cautionbun run check(12/12)👾 Generated with Letta Code