Skip to content

feat(core): track previous agent in messages - #41473

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
agent-message-previous
Open

feat(core): track previous agent in messages#41473
opencode-agent[bot] wants to merge 1 commit into
v2from
agent-message-previous

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add optional previous to agent-switched session messages
  • derive the value from ordered session state while projecting agent-selection events
  • expose the field through generated Promise client types

Design

previous belongs on the projected message rather than the durable event because it is derivable from ordered session history. The projector creates the message before updating the selected agent, matching the existing model-switch projection pattern.

Validation

  • bun test test/session-projector.test.ts (packages/core)
  • bun typecheck (packages/schema, packages/core, packages/client)
  • bun run check:generated (packages/client)
  • scoped oxlint (0 errors)

Requested by: @rekram1-node (Aiden Cline via Slack)

@opencode-agent
opencode-agent Bot force-pushed the agent-message-previous branch from c430f27 to a759399 Compare August 10, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant