Skip to content

fix(tools): preserve Tom processing checkpoints - #4786

Draft
Epochex wants to merge 1 commit into
OpenHands:mainfrom
Epochex:fix/4667-tom-checkpoint
Draft

fix(tools): preserve Tom processing checkpoints#4786
Epochex wants to merge 1 commit into
OpenHands:mainfrom
Epochex:fix/4667-tom-checkpoint

Conversation

@Epochex

@Epochex Epochex commented Aug 31, 2026

Copy link
Copy Markdown

HUMAN:


AGENT:

Why

Tom candidate selection counted event-directory files before extraction, but processing history re-listed each mutable directory after the Tom call. An event appended during that call could therefore be checkpointed even though it was never indexed. Sessions that produced no payload could also be marked processed.

Summary

  • Carry each selected session's pre-submission file count through processing.
  • Advance history only for sessions successfully extracted and submitted to Tom.
  • Preserve the existing history JSON shape and file-count comparison unit.

Issue Number

Fixes #4667

How to Test

  • uv run pytest tests/tools/tom_consult -q — 5 passed.
  • uv run pre-commit run --files openhands-tools/openhands/tools/tom_consult/executor.py tests/tools/tom_consult/test_tom_consult_executor.py — all hooks passed.

The regression adds a non-event metadata file so directory file count differs from EventLog length, appends a new event inside the Tom call, verifies the stored checkpoint remains at the pre-submission count, and confirms the next run detects the new event. Separate tests cover empty extraction and failed Tom calls.

Video/Screenshots

Not applicable; this changes backend checkpoint persistence.

Design Doc

Not applicable; this is a scoped persistence fix with no public API or file-format change.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

This follows the issue review feedback: checkpoint and candidate comparison both remain in event-directory file-count units rather than mixing in EventLog length.

Co-authored-by: openhands <openhands@all-hands.dev>
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.

[Bug]: Tom processing history can checkpoint events that were never indexed

1 participant