How Storing Task and Decision Logs Outside the AI Agent with Beads Let Me Immediately Hand Off Work to Codex During a Claude Outage

How Storing Task and Decision Logs Outside the AI Agent with Beads Let Me Immediately Hand Off Work to Codex During a Claude Outage

I pull tasks and decision logs from Beads in both Claude Code and Codex. When Claude went down, I just asked Codex to sort out progress and took over the work. Keep tasks, memory and decision logs somewhere not tied to one LLM.
2026.11.24

This page has been translated by machine translation. View original

Introduction

I usually work in Claude Code and store task states and decision logs in Beads. Recently, Claude suffered an outage, and I had to switch to Codex in the middle of my work. When I asked Codex to check and organize the progress, it grasped the state of the work from the Beads records. I was able to hand the work over without adding any explanation.

This experience led me to believe that tasks, memory, and decision logs should be stored in a place that does not depend on any single LLM. I use Beads as that storage. In this article, I introduce the environment I had prepared before the outage, and the results of reproducing the handover in a fictional project.

By the way, I have previously introduced how to use Beads in the following articles. The mechanism on the Claude Code side and the operation of notes are as described in those articles.

https://dev.classmethod.jp/articles/beads-agent-state-management-automation-scope/

https://dev.classmethod.jp/articles/beads-priority-and-notes-operation/

https://dev.classmethod.jp/articles/oss-ai-writes-ai-reviews-beads/

What is Beads

Beads is an issue tracking tool for AI coding agents. You manage issues and dependencies with the bd command, and you can store knowledge needed for your work as persistent memory with bd remember. The records are saved in a database local to the repository, so they do not depend on any particular agent.

https://github.com/gastownhall/beads

Target audience

  • Engineers who work with AI agents such as Claude Code and Codex
  • People who rely on agent conversations or agent-specific memory for work states and decision logs

References

Background

Previously, an outage occurred on Claude. I happened to be in the middle of working in Claude Code.

Although I was flustered for a moment, I immediately launched Codex and sent only the following prompt.

このプロジェクトの進行状態をまずは確認し整理してください。まだ着手しないでください。

Codex retrieved the Beads issues and notes, and replied with an organized summary of completed work, incomplete work, and items awaiting my decision. I simply continued working in Codex and did not have to wait for Claude to recover.

If the state of the work had existed only in the Claude Code conversation history, Codex would not have been able to restore it smoothly. Claude Code's auto memory is also stored in a Claude Code-specific location, so to have Codex refer to it, you would need to explicitly specify the location and instruct it to read it. The handover succeeded because I had stored the records in Beads, which belongs to neither agent.

Verification

Before the outage, I had already applied the same Beads operating rules to Codex as to Claude Code, and had introduced a hook that injects the output of bd prime at the start of a session. These operating rules stipulate that work records are consolidated into Beads issues and persistent memory, and are not scattered across Claude Code's auto memory or Codex's AGENTS.md and the like. Codex retrieves issue states by running bd itself.

This time, to show that this handover can be reproduced, I verified it with a small fictional project. The subject is a Python CLI that aggregates household budget CSVs by month.

First, I advanced the work partway in Claude Code and recorded it in Beads. The issues before handing over to Codex are as follows.

○ kakeibo-jay P2 [epic] 家計簿 CSV の月次集計 CLI を作る
├── ✓ kakeibo-jay.1 P2 task CSV の読み込み
├── ◐ kakeibo-jay.2 P2 月次集計
└── ○ kakeibo-jay.3 P2 出力の整形
○ kakeibo-2mf P3 [bug] カンマ区切りの金額で CSV の読み込みが失敗する

In addition, I recorded the following.

  • Design of the parent issue: the confirmed decision that "amounts are handled as integer yen", and that the handling of refunds spanning months is undecided
  • Notes of the monthly aggregation: completed work, undecided items, and next work
  • Dependencies: output formatting depends on the completion of monthly aggregation
  • Persistent memory: handle amounts as integer yen and do not use floating point

Next, I sent Codex the same prompt as during the outage. For the reproduction, I used codex exec, which can run non-interactively, so that the results would be easy to record.

codex exec -m gpt-6.2-sol -c model_reasoning_effort="low" -s workspace-write \
  "このプロジェクトの進行状態をまずは確認し整理してください。まだ着手しないでください。"

The verification environment is as follows.

  • bd 1.3.4
  • Claude Code 2.1.331
  • codex-cli 0.169.0, model gpt-6.2-sol, reasoning level low

Results

Codex's final response is as follows.

Codex's final response
家計簿CSVの月次集計CLIは、CSVの読み込みまで完了しています。カテゴリ別の合計は実装済みです。月別の集計と表形式の出力が残っています。

| Beads課題 | 状態 | 現在地 |
|---|---|---|
| `kakeibo-jay.1` CSV読み込み | 完了 | 日付・カテゴリ・金額を読み込み、金額を整数の円として保持します。 |
| `kakeibo-jay.2` 月次集計 | 進行中 | カテゴリ別の合計まで実装済みです。月別の集計が残っています。 |
| `kakeibo-jay.3` 出力の整形 | 月次集計待ち | 月を行、カテゴリを列にした表を表示する課題です。 |
| `kakeibo-2mf` 桁区切り付き金額の読み込み | 未着手・P3 | `1,200`のような金額の読み込みでエラーになります。月次集計の依存先には登録されていません。 |

親課題`kakeibo-jay`の完了条件は、サンプルCSVの月別・カテゴリ別合計を表で表示し、`pytest`が通ることです。課題記録には既存テスト2件の成功が残っています。今回は記録とコードを照合しました。`main`の作業ツリーに差分はありません。

月次集計の完了前に、月をまたぐ返金を返金月に計上する案と、元の購入月から差し引く案のどちらを採用するか、依頼者の判断が必要です。今の時点で回答は不要です。着手を待つ指示をこのスレッドの制約としてBeadsに記録し、課題の状態も実装も変更せずに止めています。

The session record shows that the output of bd prime was injected at the start. The injected content included persistent memory, but did not include the list of issues. Codex first referred to the Beads skill and then ran the following bd commands to retrieve the issue states.

bd ready
bd list --json
bd list --status=closed --json

The evaluation results are as follows.

Evaluation item Result
Progress of in-progress issues Mentioned completed and incomplete work
Undecided items Mentioned the two options for handling refunds and that the requester's decision is needed
Unstarted issues and dependencies Mentioned that output formatting depends on the completion of monthly aggregation
Bugs to address later Mentioned the bug with comma-separated amounts
Confirmed decisions Mentioned that amounts are held as integer yen, but did not mention that it was the requester's decision
Whether work was started The issue states and git history were identical before and after the run

In addition, Codex recorded the instruction "do not start work" with bd remember, as stipulated by the operating rules.

Discussion

I believe the handover succeeded because, not only on the Claude Code side but also on the Codex side, I had set up the operation so that work records do not depend on that agent. If you only hand over one way from Claude Code to Codex, I think approaches such as storing only Claude Code's records in Beads, or having Codex refer to the auto memory, could also work. However, if Codex starts recording in Codex-specific memory, the same problem will occur when switching back to Claude Code. I think it is important to make the storage a common place that does not depend on any single LLM.

Summary

If you work with AI agents, I recommend using Beads and storing tasks, memory, and decision logs outside the agents. In addition, introduce the same operating rules and a hook that injects the Beads state for agents other than the one you usually use. This makes it easier to switch to another agent even when an outage occurs. With Codex, you can start with bd setup codex. I hope this article is helpful to those who want to make their collaboration with AI agents more resilient to outages.


Claudeならクラスメソッドにお任せください

クラスメソッドは、Anthropic社とリセラー契約を締結しています。各種製品ガイドから、業種別の活用法、フェーズごとのお悩み解決などサービス支援ページにまとめております。まずはご覧いただき、お気軽にご相談ください。

サービス詳細を見る

Share this article

AI白書