mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-24 04:47:03 +00:00
Job wakes interrupted running turns: `deliverJobTerminalWake` only special-cased inactive sessions, so an opted-in terminal job posted a user message into whatever the agent was doing. Drop the wake when a turn is running and settle the claim so a later idle flip cannot re-fire. Those wakes also impersonated operator input — `sentFrom: 'webapp'`, a bare user message with a "Verify the outcome and continue" imperative. Tag them `hapi-system` and render them as a quiet status line in the web chat instead of a user bubble with fork/retry actions. Drop the default imperative; a prescription now has to come from `--wake-prompt`. Agents attached jobs to short work (tests, builds, typechecks) because the injected prompt was 2.1k chars of REQUIRED / MUST / FORBIDDEN. Replace it with a decision rule: default is not to attach, never for work that finishes in this turn, and run `hapi job --help` for the mechanics. Co-Authored-By: HAPI <noreply@hapi.run>