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

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

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

Visibility: public

Requested revision: 6ff39f9097b8f23fb0442c9945be0cd3a36a0c3f

Requested commit: 6ff39f9097b8f23fb0442c9945be0cd3a36a0c3f

Commit: 6ff39f9097b8f23fb0442c9945be0cd3a36a0c3f

Tree: 01ab3831f66b61d7143f76ad1bc5fc30940fe863

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

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

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