Skip to content

feat: preserve unlinked observations - #45

Merged
devanshrj merged 2 commits into
mainfrom
letta/generic-observation-records-75bb40a3
Aug 19, 2026
Merged

feat: preserve unlinked observations#45
devanshrj merged 2 commits into
mainfrom
letta/generic-observation-records-75bb40a3

Conversation

@devanshrj

@devanshrj devanshrj commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a generic observation record for environment feedback that cannot be attributed to one specific tool call
  • preserve unlinked OpenHands observations instead of treating them as orphaned tool results
  • keep linked results as tool records and keep generic observations independent of filters.toolResults
  • add normalized/canonical schema, TypeScript, Python, identity, and validation parity
  • keep CANONICAL_SCHEMA_VERSION at 3 as an immediate follow-up to feat: add opt-in system message records #44

Why a separate record

A concrete case is a Terminus agent step that executes multiple terminal commands but records one merged terminal snapshot. The output belongs to the command batch, not any one tool_call_id. Mapping it to the first or last command would invent an association, so it is preserved as a generic observation.

This PR also preserves the same source-native shape when OpenHands emits environment feedback without an action link.

Validation

  • bun run check (168 passed, 7 dependency-gated skips)
  • PYTHONPATH=python/src python3.12 -m unittest discover -s python/tests -v (11 passed, 1 dependency-gated skip)
  • built-package smoke test
  • npm pack --dry-run
  • git diff --check

Represent environment feedback without a precise tool-call link instead of dropping it or inventing an association.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
@devanshrj
devanshrj force-pushed the letta/generic-observation-records-75bb40a3 branch from 187aa08 to 6fdb7c8 Compare August 19, 2026 22:19
@devanshrj
devanshrj changed the base branch from letta/opt-in-system-records-36ca3650 to main August 19, 2026 22:19
Treat generic observations as part of the immediately introduced v3 contract and clarify the unlinked-feedback example.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
@devanshrj
devanshrj merged commit 26f9800 into main Aug 19, 2026
1 check passed
@devanshrj
devanshrj deleted the letta/generic-observation-records-75bb40a3 branch August 20, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant