MessageTool now writes sent messages to session history via SessionManager
Agent loop wires SessionManager into MessageTool constructor
Session.get_history() returns full history (removed max_messages limit)
Implementation
When message() tool is called (e.g., from heartbeat forks), the sent message is now recorded in the corresponding session's conversation history. This ensures the main conversational agent can see messages sent by other invocations.
Files changed:
nanobot/agent/tools/message.py - Added SessionManager parameter, writes to session after send
nanobot/agent/loop.py - Wires SessionManager into MessageTool
nanobot/session/manager.py - Removed max_messages limit (server-side API handles trimming)
Testing
✅ Unit test confirms MessageTool writes to session correctly ✅ No circular dependencies ✅ All imports clean
## Summary
- **MessageTool** now writes sent messages to session history via SessionManager
- **Agent loop** wires SessionManager into MessageTool constructor
- **Session.get_history()** returns full history (removed max_messages limit)
## Implementation
When `message()` tool is called (e.g., from heartbeat forks), the sent message is now recorded in the corresponding session's conversation history. This ensures the main conversational agent can see messages sent by other invocations.
**Files changed:**
- `nanobot/agent/tools/message.py` - Added SessionManager parameter, writes to session after send
- `nanobot/agent/loop.py` - Wires SessionManager into MessageTool
- `nanobot/session/manager.py` - Removed max_messages limit (server-side API handles trimming)
## Testing
✅ Unit test confirms MessageTool writes to session correctly
✅ No circular dependencies
✅ All imports clean
## Design
See: `docs/plans/2026-02-21-message-session-write-design.md`
- MessageTool now writes sent messages to session history via SessionManager
- Agent loop wires SessionManager into MessageTool constructor
- Session.get_history() returns full history (removed max_messages limit)
Server-side context editing API handles trimming, so we send full history
This ensures messages sent via the message() tool (e.g., from heartbeat forks)
are visible in the main conversational agent's context.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Implementation
When
message()tool is called (e.g., from heartbeat forks), the sent message is now recorded in the corresponding session's conversation history. This ensures the main conversational agent can see messages sent by other invocations.Files changed:
nanobot/agent/tools/message.py- Added SessionManager parameter, writes to session after sendnanobot/agent/loop.py- Wires SessionManager into MessageToolnanobot/session/manager.py- Removed max_messages limit (server-side API handles trimming)Testing
✅ Unit test confirms MessageTool writes to session correctly
✅ No circular dependencies
✅ All imports clean
Design
See:
docs/plans/2026-02-21-message-session-write-design.mdPull request closed