Fix 9P filesystem example

- Rename 'Example' to 'Basic Session Example' (more descriptive)
- Fix workflow: get actual session ID from list (not hardcoded)
- Add comments explaining each step
- Show both 'running' and 'idle' as possible states

Previous example used hardcoded ID that wouldn't exist
This commit is contained in:
Levi Neely 2026-02-19 23:44:44 +01:00
parent d07315a772
commit 79bc7bf724
1 changed files with 11 additions and 3 deletions

View File

@ -179,12 +179,20 @@ echo '{"to":"a3f2b9d1","type":"REVIEW_REQUEST","subject":"...","body":"..."}' |
9p read agent/a3f2b9d1/completed
```
### Example
### Basic Session Example
```sh
# Create session
echo 'new claude /home/user/project' | 9p write agent/ctl
echo 'Hello' | 9p write agent/a3f2b9d1/in
9p read agent/a3f2b9d1/state # "running"
# Get session ID (last created)
ID=$(9p read agent/list | tail -1 | awk '{print $1}')
# Send prompt
echo 'Hello' | 9p write agent/$ID/in
# Check state
9p read agent/$ID/state # "running" or "idle"
```
See `SECURITY.md`