# Refactor ClaudeCodeAdapter session flow and stream handling · flambo/t3code

[View on GitCafe](https://git.cafe/flambo/t3code/commit/f087c61980be2e9c53b01c483eaf32d8ac9ee281)

Repository: [flambo/t3code](https://git.cafe/flambo/t3code)

Visibility: public

Requested revision: f087c61980be2e9c53b01c483eaf32d8ac9ee281

Requested commit: f087c61980be2e9c53b01c483eaf32d8ac9ee281

Commit: f087c61980be2e9c53b01c483eaf32d8ac9ee281

Tree: fb004a9ce8329570a0da810750c7e9e17921fc8d

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Refactor ClaudeCodeAdapter session flow and stream handling

- Replace manual prompt async iterator with `Stream.fromQueue(...).toAsyncIterable`
- Use `Ref` for shared session context in tool approval callbacks
- Simplify timestamp/ID generation and close sessions via queue shutdown

```

## Parents

- [94116dab62a64e62a4c663c73b8ce59e0c498bba](https://git.cafe/flambo/t3code/commit/94116dab62a64e62a4c663c73b8ce59e0c498bba?format=markdown)

[Source at this commit](https://git.cafe/flambo/t3code/tree/f087c61980be2e9c53b01c483eaf32d8ac9ee281?format=markdown)
