CCB Comm Reply Recover
Overview
Use this skill for user-visible "I did not receive the reply" incidents. It
combines message lineage repair with mailbox and provider-pane evidence, then
hands off to runtime recovery only when the chain evidence proves the provider
process or pane must be replaced.
Mutations must go through CCB control-plane commands. Do not directly edit
mailbox, lifecycle, lease, runtime, provider-session, artifact, or tmux
authority files.
Core Workflow
- Identify the target from the user's evidence:
job_id, message_id, attempt_id, reply_id, inbound event id, or
artifact path when provided.
- agent name when the user only says a target is stuck.
ccb queue --detail all when neither id nor agent is clear.
- Trace lineage first:
ccb trace <id>
- record message, attempt, reply, event, chain, and job states.
- read the full artifact file before acting when a request or reply is
artifact-backed.
- Inspect mailbox head-of-line state:
ccb queue --detail <agent>
ccb pend --inbox --detail <agent>
- if the requested job is queued behind an active event, trace the active
job before touching the queued job.
- Cross-check runtime evidence when a job is
running or delivering longer
than expected:
ccb ps
ccb ping <agent>
ccb doctor logs <agent> when provider/pane failure is plausible.
- read-only tmux pane capture only from the socket and pane id reported by
ccb ps, and only as evidence.
- Classify the incident, choose the least disruptive repair, then re-run
trace and queue checks.
Incident Classes
normal_running: the active job is visible in the provider pane and making
progress. Report that it is running; do not restart or duplicate-submit.
head_of_line_blocked: an active job is running/delivering, later jobs
are queued behind it, and pane/log evidence shows stale, dead, mismatched, or
non-progressing provider state.
queued_behind_active: the user's job is not lost; it is queued behind an
active event. Repair the active event only if evidence proves it is blocked.
provider_pane_stale: CCB reports the runtime healthy, but pane text/logs
show an old prompt, a dead/update prompt, or a request that does not match
the active lineage.
empty_cancel_artifact_expected: trace shows terminal cancelled with
cancel_info, and the empty artifact came from an intentional cancel.
empty_bad_artifact: a completed, failed, or required artifact-backed reply
is absent, zero bytes, truncated, or unreadable without a valid cancel
reason.
duplicate_retry_after_success: a later retry or resubmission of the same
work is still queued/running after another attempt already completed and the
user received the needed reply.
chain_or_ack_stalled: a reply exists and is acceptable, but chain or
inbox progress did not advance.
followup_not_injected: ccb followup returned rejected, too_late, or
terminal; the active request was not corrected.
Repair Rules
- If trace shows the blocking job is still in flight, run
ccb cancel <job_id> first when the user supplied maintenance intent. If
cancel fails or reports a blocker, stop.
- Prefer
ccb repair retry <job_id|attempt_id> when the same work should run
again and the original lineage remains valid.
- Prefer
ccb repair resubmit <message_id> when the old execution lineage is
stale, context-corrupted, semantically wrong, or no longer suitable.
- Use
ccb repair ack <agent_name> [inbound_event_id] only when the reply is
already accepted and progress state is wrong.
- Cancel
duplicate_retry_after_success jobs rather than letting an agent run
the same review or repair twice.
- Treat only
followup_status: injected as success. For any other terminal
status, cancel and resubmit the complete corrected request when still needed;
do not queue the correction as unrelated work.
- Hand off to
ccb-self-recover for ccb restart <agent> only after chain
repair clears or cancels active work and the target remains stale, dead, or
unusable. Restart is not the first repair for a communication stall.
Verification
After every repair:
ccb trace <old_job_or_message> proves the old path is terminal, completed,
or intentionally cancelled.
ccb queue --detail <agent> and ccb pend --inbox --detail <agent> show no
unexpected active head-of-line blockage.
- the desired job is completed, or a fresh valid job is queued/running with no
duplicate path.
- artifact-backed replies are read from the full artifact file when needed.
- report intentional cancelled empty artifacts as expected maintenance output,
not as missing user replies.
Example Pattern
In a typical stall incident, the user reported that no specialist-agent reply
arrived. Trace showed one old active job stuck in running/delivering, while
later asks were queued behind it. Provider logs showed a host update and pane
death, but ccb ps still showed a bound pane. The correct repair was:
- cancel the stale active job;
- verify the next queued job entered the provider pane and was progressing;
- avoid restart while valid work was running;
- accept the completed new reply;
- cancel the duplicate old retry that remained after success;
- verify the target mailbox returned to idle.
Red Lines
- Do not restart, clear, reload, or kill before tracing the message lineage.
- Do not submit a second concurrent path for the same work while the original
path is still active unless the user explicitly retargets or duplicates the
task.
- Do not treat observer snapshots as terminal authority; use
ccb trace.
- Do not infer from artifact preview text when the full artifact is required.
- Do not mutate tmux directly or write CCB runtime authority files.
- Do not read provider secrets, credentials, API keys, or unrelated private
provider state.
1---2name: ccb-comm-reply-recover3description: Diagnose and recover CCB communication and reply delivery stalls. Use when a user reports a missing CCB_REPLY, stuck ask, agent stuck busy/delivering, queued work behind an active job, cancelled/incomplete reply, empty artifact, chain not continuing, rejected active-turn followup, duplicate retry after success, or a CCB mailbox/communication backend that appears stuck.4---56# CCB Comm Reply Recover78## Overview910Use this skill for user-visible "I did not receive the reply" incidents. It11combines message lineage repair with mailbox and provider-pane evidence, then12hands off to runtime recovery only when the chain evidence proves the provider13process or pane must be replaced.1415Mutations must go through CCB control-plane commands. Do not directly edit16mailbox, lifecycle, lease, runtime, provider-session, artifact, or tmux17authority files.1819## Core Workflow20211. Identify the target from the user's evidence:22 - `job_id`, `message_id`, `attempt_id`, `reply_id`, inbound event id, or23 artifact path when provided.24 - agent name when the user only says a target is stuck.25 - `ccb queue --detail all` when neither id nor agent is clear.262. Trace lineage first:27 - `ccb trace <id>`28 - record message, attempt, reply, event, chain, and job states.29 - read the full artifact file before acting when a request or reply is30 artifact-backed.313. Inspect mailbox head-of-line state:32 - `ccb queue --detail <agent>`33 - `ccb pend --inbox --detail <agent>`34 - if the requested job is queued behind an active event, trace the active35 job before touching the queued job.364. Cross-check runtime evidence when a job is `running` or `delivering` longer37 than expected:38 - `ccb ps`39 - `ccb ping <agent>`40 - `ccb doctor logs <agent>` when provider/pane failure is plausible.41 - read-only tmux pane capture only from the socket and pane id reported by42 `ccb ps`, and only as evidence.435. Classify the incident, choose the least disruptive repair, then re-run44 trace and queue checks.4546## Incident Classes4748- `normal_running`: the active job is visible in the provider pane and making49 progress. Report that it is running; do not restart or duplicate-submit.50- `head_of_line_blocked`: an active job is `running`/`delivering`, later jobs51 are queued behind it, and pane/log evidence shows stale, dead, mismatched, or52 non-progressing provider state.53- `queued_behind_active`: the user's job is not lost; it is queued behind an54 active event. Repair the active event only if evidence proves it is blocked.55- `provider_pane_stale`: CCB reports the runtime healthy, but pane text/logs56 show an old prompt, a dead/update prompt, or a request that does not match57 the active lineage.58- `empty_cancel_artifact_expected`: trace shows terminal `cancelled` with59 `cancel_info`, and the empty artifact came from an intentional cancel.60- `empty_bad_artifact`: a completed, failed, or required artifact-backed reply61 is absent, zero bytes, truncated, or unreadable without a valid cancel62 reason.63- `duplicate_retry_after_success`: a later retry or resubmission of the same64 work is still queued/running after another attempt already completed and the65 user received the needed reply.66- `chain_or_ack_stalled`: a reply exists and is acceptable, but chain or67 inbox progress did not advance.68- `followup_not_injected`: `ccb followup` returned `rejected`, `too_late`, or69 `terminal`; the active request was not corrected.7071## Repair Rules7273- If trace shows the blocking job is still in flight, run74 `ccb cancel <job_id>` first when the user supplied maintenance intent. If75 cancel fails or reports a blocker, stop.76- Prefer `ccb repair retry <job_id|attempt_id>` when the same work should run77 again and the original lineage remains valid.78- Prefer `ccb repair resubmit <message_id>` when the old execution lineage is79 stale, context-corrupted, semantically wrong, or no longer suitable.80- Use `ccb repair ack <agent_name> [inbound_event_id]` only when the reply is81 already accepted and progress state is wrong.82- Cancel `duplicate_retry_after_success` jobs rather than letting an agent run83 the same review or repair twice.84- Treat only `followup_status: injected` as success. For any other terminal85 status, cancel and resubmit the complete corrected request when still needed;86 do not queue the correction as unrelated work.87- Hand off to `ccb-self-recover` for `ccb restart <agent>` only after chain88 repair clears or cancels active work and the target remains stale, dead, or89 unusable. Restart is not the first repair for a communication stall.9091## Verification9293After every repair:9495- `ccb trace <old_job_or_message>` proves the old path is terminal, completed,96 or intentionally cancelled.97- `ccb queue --detail <agent>` and `ccb pend --inbox --detail <agent>` show no98 unexpected active head-of-line blockage.99- the desired job is completed, or a fresh valid job is queued/running with no100 duplicate path.101- artifact-backed replies are read from the full artifact file when needed.102- report intentional cancelled empty artifacts as expected maintenance output,103 not as missing user replies.104105## Example Pattern106107In a typical stall incident, the user reported that no specialist-agent reply108arrived. Trace showed one old active job stuck in `running`/`delivering`, while109later asks were queued behind it. Provider logs showed a host update and pane110death, but `ccb ps` still showed a bound pane. The correct repair was:1111121. cancel the stale active job;1132. verify the next queued job entered the provider pane and was progressing;1143. avoid restart while valid work was running;1154. accept the completed new reply;1165. cancel the duplicate old retry that remained after success;1176. verify the target mailbox returned to idle.118119## Red Lines120121- Do not restart, clear, reload, or kill before tracing the message lineage.122- Do not submit a second concurrent path for the same work while the original123 path is still active unless the user explicitly retargets or duplicates the124 task.125- Do not treat observer snapshots as terminal authority; use `ccb trace`.126- Do not infer from artifact preview text when the full artifact is required.127- Do not mutate tmux directly or write CCB runtime authority files.128- Do not read provider secrets, credentials, API keys, or unrelated private129 provider state.