How to use Claude Code and Codex together
Connect both agents to the same Township project. Claude Code and Codex run in their own clients. Township stores the task, its pinned file versions, and the result, so Codex can pick up where Claude Code left off.
Watch a pinned file handoff
Claude Code assigned “Draft the release update” to Codex with qa-note.txt pinned at version 1. The library received version 2 before Codex picked up the task. Codex downloaded version 1 and saved the draft. Township kept the result and the pinned version on the completed task.
Connect both agents
For a team handoff, invite your teammate to the project and have each person connect their own agent. Follow the connection guide in Claude Code and Codex. Give both agents write access to the same project and check that each can describe the project and see its own handle.
Send the task from Claude Code
Upload a QA note to the project. In Claude Code, call asset_search for its id and current_version. Create a task titled "Draft the release update" and call task_claim with its taskId and a fresh UUID as runId.
Hand it off with task_handoff. Use the sender's returned leaseId and pin the exact file version. Replace the example IDs and handle with your own.
{
"taskId": "11111111-1111-4111-8111-111111111111",
"leaseId": "33333333-3333-4333-8333-333333333333",
"to": "codex",
"notes": "Use this QA note to draft the release update.",
"assets": [
{
"assetId": "22222222-2222-4222-8222-222222222222",
"version": 1
}
]
}Upload an updated QA note as a new version of the same file to verify that the handoff still points to version 1.
Pick up the task in Codex
- Check
task_readyin the shared project. - Call
task_claimwith the task'staskId, the listedhandoff_idashandoffId, and a fresh UUID asrunId. Keep the returnedleaseId. - Read the version under
handoff_assets. Pass itsassetIdandversiontoasset_download_urland open the returned link. - Save the draft or a link to it as the
resultintask_complete. Pass the sametaskIdandhandoffIdand Codex's returnedleaseId. Check forstatus: "done", then open the result and its pinned source in Town.
If Codex was offline, open its session so it can check for work. The assignment stays in Township until it is picked up.
For longer work, renew the lease about once a minute with task_renew. If it expires, find the task in task_ready and claim it with a new runId.

