<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu, branch makima/add-task-branching</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=makima%2Fadd-task-branching</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=makima%2Fadd-task-branching'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-01-21T16:23:01+00:00</updated>
<entry>
<title>feat(server): Add background cleanup for stale anonymous tasks</title>
<updated>2026-01-21T16:23:01+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:23:01+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=eed71f82130d7d767cb18bf8ef687166d9143449'/>
<id>urn:sha1:eed71f82130d7d767cb18bf8ef687166d9143449</id>
<content type='text'>
Integrate the anonymous task cleanup into the server startup:
- Run cleanup on server startup to handle tasks from previous runs
- Spawn a background task that runs cleanup every 24 hours
- Delete anonymous tasks (contract_id = NULL) that are in terminal state
  (done, failed, merged) and older than 7 days

This follows the same pattern as the existing daemon cleanup mechanism.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(db): Add cleanup_stale_anonymous_tasks function</title>
<updated>2026-01-21T16:22:56+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:22:56+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=0fe52039768b8f6bb60d15fb87b6d330de66d15f'/>
<id>urn:sha1:0fe52039768b8f6bb60d15fb87b6d330de66d15f</id>
<content type='text'>
Add a database function to delete anonymous tasks (tasks with contract_id = NULL)
that are in a terminal state (done, failed, merged) and older than a specified
number of days. This helps prevent accumulation of orphaned tasks that were created
for ad-hoc operations like task branching.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(frontend): Add branch task handler to mesh route</title>
<updated>2026-01-21T16:20:05+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:20:05+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=9e724358438e7a6da69657260a218aedd76f1911'/>
<id>urn:sha1:9e724358438e7a6da69657260a218aedd76f1911</id>
<content type='text'>
- Import branchTask API function
- Add handleBranch callback that calls branchTask and navigates to new task
- Pass onBranch prop to TaskDetail component

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(frontend): Add branch button and modal to TaskDetail</title>
<updated>2026-01-21T16:19:22+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:19:22+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=f07f5f6bb2691cb62b0406a912e1d4962abee8d8'/>
<id>urn:sha1:f07f5f6bb2691cb62b0406a912e1d4962abee8d8</id>
<content type='text'>
- Import BranchTaskModal component
- Add onBranch prop to TaskDetailProps interface
- Add showBranchModal state
- Add canBranch check (task status !== "pending")
- Add purple-themed Branch button next to Continue button
- Render BranchTaskModal when showBranchModal is true

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(frontend): Add BranchTaskModal component</title>
<updated>2026-01-21T16:18:11+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:18:11+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=ef839683aed1f501e0de507e2ca72ccdc7b29666'/>
<id>urn:sha1:ef839683aed1f501e0de507e2ca72ccdc7b29666</id>
<content type='text'>
Modal component for creating a branched task from an existing task.
Features:
- Pre-filled name with "Branch of {taskName}"
- Required message textarea for initial task instruction
- Cancel and Create Branch buttons with purple theme
- Error message display on failure
- Follows existing modal patterns (PhaseConfirmationModal)

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat(frontend): Add task branching API types and function</title>
<updated>2026-01-21T16:17:42+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:17:42+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=da275cf510c9ddf2904e5a6cb5d4d5464f494530'/>
<id>urn:sha1:da275cf510c9ddf2904e5a6cb5d4d5464f494530</id>
<content type='text'>
- Make contractId optional in CreateTaskRequest interface
- Add BranchTaskRequest interface with message, name, includeConversation fields
- Add BranchTaskResponse interface with task, messageCount, daemonId fields
- Add branchTask API function to call POST /api/v1/mesh/tasks/{id}/branch

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Fix CreateTaskRequest usages after contract_id change</title>
<updated>2026-01-21T16:16:23+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:16:23+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=0c52f42a753f6d3e7581764670238ec5fae721da'/>
<id>urn:sha1:0c52f42a753f6d3e7581764670238ec5fae721da</id>
<content type='text'>
Update all CreateTaskRequest instantiations to:
- Wrap contract_id values in Some() since it's now Option&lt;Uuid&gt;
- Add branched_from_task_id: None to all instances
- Add conversation_history: None to all instances

Updated files:
- db/repository.rs (create_task function)
- server/handlers/contract_chat.rs (4 instances)
- server/handlers/contracts.rs (supervisor creation)
- server/handlers/mesh.rs (3 instances)
- server/handlers/mesh_chat.rs
- server/handlers/mesh_supervisor.rs
- server/handlers/transcript_analysis.rs (2 instances)

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Register branch_task endpoint and schemas in OpenAPI</title>
<updated>2026-01-21T16:11:54+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:11:54+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=ea2c609e8a528dde09944a22c9155eb786fe729e'/>
<id>urn:sha1:ea2c609e8a528dde09944a22c9155eb786fe729e</id>
<content type='text'>
- Add BranchTaskRequest and BranchTaskResponse to model imports
- Add mesh::branch_task to documented paths
- Add BranchTaskRequest and BranchTaskResponse to component schemas

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Register branch_task route in server router</title>
<updated>2026-01-21T16:11:24+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:11:24+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=f4bffa9c5d50ffecad36b4ae379c8c3b2da17de3'/>
<id>urn:sha1:f4bffa9c5d50ffecad36b4ae379c8c3b2da17de3</id>
<content type='text'>
Add POST /mesh/tasks/{id}/branch route for task branching endpoint.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add branch_task endpoint for task branching</title>
<updated>2026-01-21T16:11:09+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-01-21T16:11:09+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=279888491d367ee6307fc4e2b5335355d2e13ba4'/>
<id>urn:sha1:279888491d367ee6307fc4e2b5335355d2e13ba4</id>
<content type='text'>
Implement POST /api/v1/mesh/tasks/{id}/branch endpoint that:
- Creates a new anonymous task from an existing task's conversation
- Sets branched_from_task_id to track the source task
- Optionally includes conversation history for context continuation
- Automatically starts on available daemon if one is connected
- Uses continue_from_task_id to inherit worktree from source
- Records history event for branching operation

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
