Skip to content
Agentmart
Submit a tool

silent-fail-recovery

Deterministic recovery for Jules sessions that reach COMPLETED state without producing a remote branch (the "silent-fail" bug).

Skill by netzkontrast

IndexedMIT
Write a review

Chalk Labs

Need help deploying silent-fail-recovery?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/netzkontrast-silent-fail-recovery

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Deterministic recovery for Jules sessions that reach COMPLETED state without producing a remote branch (the "silent-fail" bug). Use when the user says "Jules completed but no branch", "session COMPLETED but branch missing", "silent fail", "jules-patch-extract", or "recover patch from completed session" — or whenever an orchestrator has observed the auto-publish flow misfire.

Use cases: research

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/silent-fail-recovery

What's inside

Skill name
silent-fail-recovery
Description
Deterministic recovery for Jules sessions that reach COMPLETED state without producing a remote branch (the "silent-fail" bug). Use when the user says "Jules completed but no branch", "session COMPLETED but branch missing", "silent fail", "jules-patch-extract", or "recover patch from completed session" — or whenever an orchestrator has observed the auto-publish flow misfire.
License
MIT
Instructions
118 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

## The rule (one sentence)

When a Jules session is `COMPLETED` but no matching branch exists on
`origin`, recover via API patch extraction — never re-dispatch.

## Why this exists

The Jules backend's auto-finalize flow (which is supposed to push the
sandbox branch and open a PR) fails silently on an intermittent basis.
The session transitions to `COMPLETED`, the sandbox shows a clean
`git status`, but no branch ever appears on the remote. The completed
work IS preserved on the session record — `outputs[*].changeSet.gitPatch.unidiffPatch`
contains the canonical unidiff — but only direct API access can reach
it. Re-dispatching a fresh session for the same spec burns quota for
zero incremental output: the patch already exists.

The canonical procedure is documented in `Plan/JULES_PROTOCOL.md §8`.
This skill is the operational shortcut that turns that document into a
five-step runbook.

## When this skill applies (and when it does not)

Applies:
- Session state = `COMPLETED`.
- `git ls-remote origin | grep <sid-or-alias>` returns nothing.
- Session has `outputs[]` populated with `gitPatch.unidiffPatch`.

Does NOT apply:
- Session state = `FAILED` (no outputs to recover; legitimate
  re-dispatch is allowed).
- Session state = `AWAITING_PLAN_APPROVAL` (call `jules_approve`).
- Branch DOES exist on remote (auto-flow worked; nothing to recover).
- Session has empty `outputs[]` despite COMPLETED (timed-out plan
  approval; this is a different failure mode — see
  `jules-plugin/skills/jules/references/state-machine.md`).

## The five-step recovery

1. **Confirm silent-fail.** Run `git ls-remote origin | grep <sid>` (or
   the branch alias if known). Empty output = silent-fail confirmed.
   If the branch is there, this skill does not apply.

2. **Extract the patch.** Run the context-safe extractor from inside
   the worktree:
   ```bash
   AGENCY_REPO_ROOT=$(pwd) python3 tools/jules-patch-extract.py <sid>
   ```
   Output is JSON: `{sid, patches: [{path, bytes, files, first_files[], has_more}]}`.
   The patch body is written to `/tmp/jules-patches/<sid>-out{i}.patch`
   and NEVER echoed to stdout. See the `context-safe-patch-handling`
   skill for the non-negotiable handling rules.

3. **Apply on a fresh branch off `Master`.** Re-run with `--apply`
   and `--branch`:
   ```bash
   AGENCY_REPO_ROOT=$(pwd) python3 tools/jules-patch-extract.py <sid> \
     --apply --branch claude/<spec-slug>-recovered-<sid-short>
   ```
   The extractor checks out `Master`, pulls, branches, then runs
   `git apply --stat` (filenames only — no diff body) followed by
   `git apply --whitespace=nowarn`. If apply fails on any patch, the
   extractor stops and reports `skipped_after_failure`.

4. **Commit preserving Jules's authorship.** Stage the changes and
   commit with the bot trailer:
   ```bash
   git commit -m "$(cat <<'EOF'
   <imperative subject under 72 chars>

   Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
   EOF
   )"
   ```

5. **Push and open the PR manually.** Push with `-u origin <branch>`,
   then open the PR via `mcp__github__create_pull_request`. In the
   body's `## Spec` section, note that publication was via API
   extraction rather than the auto-flow, and reference the original
   session ID for forensic traceability.

## What NOT to do

- **Do NOT re-dispatch a fresh Jules session on the same spec.** The
  patch already exists on the original session's record; a new session
  burns quota for zero output. Re-dispatch is reserved for genuine
  implementation failures (state = `FAILED`, empty `outputs[]`).
- **Do NOT instruct Jules to "git push" or "verify branch on github"**
  in the original prompt. The agent's sandbox cannot directly push —
  the auto-flow owns that step. Over-specific push instructions waste
  context and turns. Phrase publication openly: *"publish your work
  via the standard flow; if publication does not occur within one
  poll cycle, the orchestrator will recover via API extraction."*
- **Do NOT `cat` the saved patch.** See `context-safe-patch-handling`.

## Red flags

| Symptom | Action |
|---|---|
| Tempted to dispatch a "fresh" Jules session on the same spec | Stop. Run the extractor instead. |
| About to read `/tmp/jules-patches/<sid>-out0.patch` with `cat`/`head`/`grep` | Stop. The extractor already emitted the stats you need. |
| `--apply` reports `base_branch_prep_failed` | The repo state is dirty or the remote is unreachable. Resolve, then re-run. Do NOT swallow the error. |
| `apply_returncode != 0` and `skipped_after_failure` is set | An earlier patch failed; later patches likely depend on it. Resolve the failure, then re-run from scratch. |
| Session has empty `outputs[]` despite COMPLETED | Not a silent-fail — plan-approval timeout. Different recovery path. |

## References

- **`Plan/JULES_PROTOCOL.md §8`** — canonical specification of this
  recovery flow. This skill is a runbook view of that section.
- `tools/jules-patch-extract.py` — the extractor implementation.
  Read the docstring for `--apply` / `--branch` / `--repo` semantics.
- `skills/agentic/context-safe-patch-handling/SKILL.md` — the
  never-echo rule for the saved patch file.
- `skills/agentic/jules-orchestrator-discipline/SKILL.md` — broader
  orchestrator rules including the 2-silent-fails-then-switch policy.
- `tools/jules-archive/` — read-only audit trail of 2026-05-17
  forensic patches; useful when sanity-checking the recovery flow.

From netzkontrast/agency, MIT.

More from netzkontrast/agency

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jun 8, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from netzkontrast

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get silent-fail-recovery running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying silent-fail-recovery?

CallGet help
Cite this page

silent-fail-recovery skill. Agent Mart. https://agentmart.dev/skills/netzkontrast-silent-fail-recovery (last updated 2026-10-24)