Hook system

Hook system

Hooks keep session state and pressure under ~/.puax/sessions/. v3.4 added breakthrough de-escalation and compaction protection. v4 lets the same events call puax_tick.

Pieces

State

Pressure, tried paths, interventions. A break under about two hours can resume.

L0–L4

Failures raise it. A breakthrough can lower it.

Six events

UserPromptSubmit, PostToolUse, PreToolUse, PreCompact, SessionStart, Stop. Native hooks call the tick.

Compaction

puax_update_reasoning_state saves the chain and the approaches already tried.

Session tools

ToolJob
puax_start_sessionStart, and load the evolution baseline
puax_end_session / puax_reset_sessionEnd or reset
puax_get_pressure_levelRead the level
puax_handle_breakthroughLower pressure after a real win
puax_tickThe v4 beat that can replace a hand-rolled sequence

Quiz

After three failures and then a success, which tool drops the pressure?

Back to chapter
Next