Files
hapi/docs
weishuandHAPI 6cd6d375c0 fix(jobs): stop waking busy agents and gate session jobs to long work
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>
2026-11-16 19:05:38 +08:00
..
2026-01-04 20:45:15 +08:00