Summary
The reminders system (config/reminders.go, RemindersConfig) is file-only: it loads from ~/.infer/reminders.yaml (or a project .infer/reminders.yaml) and falls back to DefaultRemindersConfig(). The only env override today is INFER_REMINDERS_ENABLED (master switch, in applyRemindersEnvOverrides). There is no way to supply the content of the reminders config via an env var or CLI flag — only via a file on disk.
This is a pain point for embedded/CI consumers (notably inference-gateway/infer-action) that compose reminders programmatically and currently have to write a file to ~/.infer/reminders.yaml before launching the CLI.
Proposal
Add a path to supply the reminders config content without writing a file. Two complementary options:
Option A — env var with inline YAML (preferred)
INFER_REMINDERS_CONFIG='enabled: true
reminders:
- name: my-nudge
hook: pre_stream
trigger: interval
interval: 5
text: "..."
'
applyRemindersEnvOverrides (or the loader) would, when INFER_REMINDERS_CONFIG is set and non-empty, parse it as YAML and use it in place of the file-loaded RemindersConfig (precedence: env > project .infer/reminders.yaml > ~/.infer/reminders.yaml > built-in defaults). This mirrors how several other config sections already accept env overrides.
Option B — --reminders-file PATH flag
A flag pointing at an arbitrary file (not constrained to ~/.infer/) so a consumer can stage a temp file without touching the home dir. Less ergonomic for the action (still needs a temp file) but useful for infer run scripting.
A combination (env var for inline, flag for a custom path) would be ideal.
Why it matters
infer-action composes a reminders YAML tailored to each run context (issue vs PR vs fork, git-ops on/off, memory enabled, configurable cadence) and writes it to ~/.infer/reminders.yaml before invoking the CLI (infer-action PR #151, issue infer-action #144). Writing into ~/.infer/ from a CI job is fragile:
- It can race with a user-managed
~/.infer/reminders.yaml on self-hosted runners (the action overwrites it).
- It couples the action to the CLI's home-dir file-resolution order (a project
.infer/reminders.yaml silently takes precedence and overrides the action's composed file, which is surprising in CI).
- It forces the action to duplicate the CLI's built-in memory reminder texts (because a loaded file replaces the built-in list rather than merging) — an env/flag path doesn't fix the replace-vs-merge semantics on its own, but it removes the file-write footgun that makes the duplication mandatory today.
With INFER_REMINDERS_CONFIG, the action could pass its composed YAML inline and skip the file write entirely.
Related: a failure-gated reminder trigger
While here, the action would also benefit from a failure-gated post_tool trigger. The current trigger catalog (always, interval, turns_before_max, once) has no mode that fires only after a failed tool call — ReminderQuery carries no error/success field. The action wants a nudge that re-states the "a failed call means the change did not happen" rule only on failure, but today it must use always (firing after every tool call), which adds per-turn injection cost. Exposing the tool-call outcome on ReminderQuery (or adding a on_failure trigger) would let this fire only when it matters.
Acceptance criteria (suggested)
Context
config/reminders.go — RemindersConfig struct + DefaultRemindersConfig()
cmd/config.go — applyRemindersEnvOverrides (currently only INFER_REMINDERS_ENABLED)
config/config.go — Reminders field is yaml:"-" mapstructure:"-" (loaded separately from config.yaml)
internal/domain/interfaces.go — SystemReminderProvider / ReminderQuery
internal/agent/agent_utils.go — injectDueReminders
Consuming side: inference-gateway/infer-action#144, infer-action#151.
Happy to contribute a PR if there's appetite for either option.
Summary
The reminders system (
config/reminders.go,RemindersConfig) is file-only: it loads from~/.infer/reminders.yaml(or a project.infer/reminders.yaml) and falls back toDefaultRemindersConfig(). The only env override today isINFER_REMINDERS_ENABLED(master switch, inapplyRemindersEnvOverrides). There is no way to supply the content of the reminders config via an env var or CLI flag — only via a file on disk.This is a pain point for embedded/CI consumers (notably inference-gateway/infer-action) that compose reminders programmatically and currently have to write a file to
~/.infer/reminders.yamlbefore launching the CLI.Proposal
Add a path to supply the reminders config content without writing a file. Two complementary options:
Option A — env var with inline YAML (preferred)
applyRemindersEnvOverrides(or the loader) would, whenINFER_REMINDERS_CONFIGis set and non-empty, parse it as YAML and use it in place of the file-loadedRemindersConfig(precedence: env > project.infer/reminders.yaml>~/.infer/reminders.yaml> built-in defaults). This mirrors how several other config sections already accept env overrides.Option B —
--reminders-file PATHflagA flag pointing at an arbitrary file (not constrained to
~/.infer/) so a consumer can stage a temp file without touching the home dir. Less ergonomic for the action (still needs a temp file) but useful forinfer runscripting.A combination (env var for inline, flag for a custom path) would be ideal.
Why it matters
infer-actioncomposes a reminders YAML tailored to each run context (issue vs PR vs fork, git-ops on/off, memory enabled, configurable cadence) and writes it to~/.infer/reminders.yamlbefore invoking the CLI (infer-action PR #151, issue infer-action #144). Writing into~/.infer/from a CI job is fragile:~/.infer/reminders.yamlon self-hosted runners (the action overwrites it)..infer/reminders.yamlsilently takes precedence and overrides the action's composed file, which is surprising in CI).With
INFER_REMINDERS_CONFIG, the action could pass its composed YAML inline and skip the file write entirely.Related: a failure-gated reminder trigger
While here, the action would also benefit from a failure-gated
post_tooltrigger. The current trigger catalog (always,interval,turns_before_max,once) has no mode that fires only after a failed tool call —ReminderQuerycarries no error/success field. The action wants a nudge that re-states the "a failed call means the change did not happen" rule only on failure, but today it must usealways(firing after every tool call), which adds per-turn injection cost. Exposing the tool-call outcome onReminderQuery(or adding aon_failuretrigger) would let this fire only when it matters.Acceptance criteria (suggested)
INFER_REMINDERS_CONFIGenv var (inline YAML) is honored when set, overriding the file-loaded config with the same precedence rules as other env overrides--reminders-file PATHflag (or equivalent) forinfer run/infer agentpointing at a non-home-dir fileReminderQuery(or a new trigger) exposes tool-call failure so apost_toolreminder can fire only on failed callsdocs/configuration-reference.mdanddocs/commands-reference.mdContext
config/reminders.go—RemindersConfigstruct +DefaultRemindersConfig()cmd/config.go—applyRemindersEnvOverrides(currently onlyINFER_REMINDERS_ENABLED)config/config.go—Remindersfield isyaml:"-" mapstructure:"-"(loaded separately fromconfig.yaml)internal/domain/interfaces.go—SystemReminderProvider/ReminderQueryinternal/agent/agent_utils.go—injectDueRemindersConsuming side: inference-gateway/infer-action#144, infer-action#151.
Happy to contribute a PR if there's appetite for either option.