Skip to content

notify dont work sometimes #1

Description

@Kurt-Shiwz
-- init.lua
    -- Cooldown logic: working -> idle needs sustained idle before transitioning
    if old_status == 'working' and new_status == 'idle' then
        if not current_state.cooldown_start then
            current_state.cooldown_start = now
            current_state.last_update = now
            return current_state
        elseif (now - current_state.cooldown_start) < config.cooldown_ms then
            current_state.last_update = now
            return current_state
        end
        current_state.cooldown_start = nil
    elseif new_status == 'working' then
        current_state.cooldown_start = nil
        -- Agent confirmed working — next waiting state is a genuinely new question.
        if state.waiting_notified[pane_id] then
            wezterm.log_warn('[agent-deck] CLEAR waiting_notified pane=' .. pane_id .. ' (confirmed working)')
            clear_pane_notification(pane_id, config)
            clear_waiting_notified(pane_id)
        end
   ---------------------------
    elseif new_status == 'idle' then
        -- Agent went idle (user replied, Claude finished quickly without sustained working state).
        if state.waiting_notified[pane_id] then
            wezterm.log_warn('[agent-deck] CLEAR waiting_notified pane=' .. pane_id .. ' (idle)')
            clear_pane_notification(pane_id, config)
            clear_waiting_notified(pane_id)
        end
    ---------------------------
    end

when status is 'idle' dont clear waiting_notified, i try to fix it by claude like this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions