Repository navigation
3ngram 1.14.0
3ngram v1.14.0
The Stop debrief nudge asks less often, for sessions that opted into it with
THREENGRAM_STOP_NUDGE=1. The server now waits a cooldown before re-arming a
session's nudge, and the 3ngram-hook-v1.1.1 hook stays quiet while a Claude
Code turn is waiting on background work. A default install, with the nudge
off, sees no change.
Changes
Session triage
- Re-arm cooldown (#457). Re-entry was one nudge per turn that produced
new provenance, so a long session that kept writing was asked to debrief
after nearly every turn, including the turn right after a debrief.
POST /api/v1/agent-sessions/triage/beginnow declines with the new reason
cooldownwhile the run's last armed attempt is younger than
SESSION_TRIAGE_REARM_COOLDOWN_MINUTES(default 30). - The decline consumes nothing. The signal stays untriaged, the first Stop
past the window arms on it, and the closer still sees it if the session ends
first. A run that never armed has no cooldown, so the first nudge of a
session is unchanged. - The age is read from
triage_armed_at, which is never cleared, so a
completedrun that a later write flipped back toidleis covered too.
Thenot-live,terminal,pending,pending-freshandno-signal
declines keep priority over the cooldown, and the cooldown is checked before
the debounce. - A reader clock slightly behind the arming clock only defers the nudge. An
age more negative than the whole window reads as no cooldown, so a badly
skewed arming clock cannot silence a run.
Stop hook (3ngram-hook-v1.1.1)
- No nudge while background work runs (#456, for #455). Claude Code passes
in-flight background work to a Stop hook asbackground_tasks. When that
list has an entry, the hook asks nothing: it does not calltriage/begin,
so no attempt is armed or spent, and the provenance stays untriaged for a
later Stop or the closer. Asession_cronsentry withrecurring: false, a
one-shot wakeup, also pauses the nudge. - Teammate entries do not pause it, because an idle teammate can stay listed
as running for the rest of the session. Recurring crons and crons that do
not say whether they recur do not pause it either. Only each task'stype
is read;statusvalues are not a documented contract. - The finalize path (
stop_hook_active) still runs first, so an injected
debrief's continuation completes its attempt, and the heartbeat still runs
on every Stop. A list that is not an array changes nothing, and an odd shape
cannot fail the Stop decode and skip the heartbeat. - Accepted costs: a long-lived background process such as a dev server keeps
the nudge quiet while it runs, and that session falls back to the closer. An
attempt leftpendingby a loststop_hook_activeor a failed finalize is
finalized by the next quiet Stop instead of this one. - A harness or version that does not send
background_tasksor
session_cronsbehaves as before. Claude Code documents both lists as
present only when its task registry is reachable.
Compatibility
- Strict parsers of the
triage/beginresponse must accept the decline
reasoncooldown.triageDeclineReasonSchemaand the OpenAPI enum gain it.
The hook branches only onpendingand treats every other decline as "no
nudge", so an installed3ngram-hookneeds no update for the cooldown. - For direct package users:
TriageDebounceThresholds(@3ngram/db,
re-exported by@3ngram/core) andSessionTriageConfig(@3ngram/config)
gain the requiredrearmCooldownMs, in milliseconds, with0switching the
cooldown off. A composition root that builds the thresholds by hand must
supply it and fails to compile in TypeScript until it does.
loadSessionTriageConfig()already supplies it. The managed dashboard in
3ngram-platformdoes not build the thresholds and is unaffected. @3ngram/server,@3ngram/worker,@3ngram/sdkand the3ngramCLI move to
1.14.0 together. The dependency versions are config 0.8.0, schema 0.16.0,
llm 0.5.0, db 0.18.0 and core 0.19.0.- The
3ngram-hookbinary ships from its own tag,3ngram-hook-v1.1.1. The
background-work change reaches a machine only once that binary is
reinstalled there: download the release archive, verify it against
checksums.txtand replace the binary on yourPATH
(cmd/3ngram-hook/README.md, "Install (released binaries)").
3ngram-hook --versionthen reports3ngram-hook 3ngram-hook-v1.1.1.
Managed dashboard changes are delivered separately by3ngram-platform.
Operations
- No migrations. The schema head stays at
0047_tough_lockheed, and
provision-roles.sqlis unchanged since v1.12.0, so it does not need a
rerun. - New optional server setting
SESSION_TRIAGE_REARM_COOLDOWN_MINUTES: whole
minutes from 0 to 1440, default 30.0switches the cooldown off and
restores the previous one-nudge-per-writing-turn behaviour. A blank value
reads as unset, so it means 30, not 0; set0explicitly to switch the
cooldown off. - Worker images must be adopted separately from the server package. Verify the
image and completion of an actual execution for every scheduled worker.
Immutable container reference
ghcr.io/b3dmar/3ngram@sha256:a598b6cce9dd1ec9beb6a56a9414168a6963211beb3a8d68a8101bdfbaa6416e