Skip to content

feat(kanban): stamp handoff freshness so workers don't read stale state as current - #53973

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5393a555
Jun 28, 2026
Merged

feat(kanban): stamp handoff freshness so workers don't read stale state as current#53973
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5393a555

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Kanban workers now see when a handoff was produced, so a sibling's day-old parent result / comment / report stops being read as live truth.

On multi-agent boards (orchestrator + kanban + multiple workers), build_worker_context surfaced recalled state — parent task results, the comment thread, prior attempts, role history — with at best a bare absolute timestamp. An LLM reads "2026-06-25 14:30" as fact regardless of how old it is, and parent results carried no timestamp at all. So a worker picking up a "quick change" the next day acts on stale state as if it's current.

Changes

  • hermes_cli/kanban_db.py:
    • New _relative_age(ts, now) helper → coarse, LLM-legible buckets (just now / 5m ago / 18h ago / 3d ago); empty string on missing/unparseable, just now on clock-skewed future timestamps.
    • build_worker_context takes one shared clock reading and appends a relative age to every recalled-state line: parent results, comments, prior attempts, role history.
    • Parent-results section gains a completion-age stamp (### t_xxxx (completed 18h ago)) and a one-line frame: point-in-time snapshot, not live state — re-verify against the source before acting on it as current.
  • tests/hermes_cli/test_kanban_core_functionality.py: behavior tests for the age buckets (incl. skew/missing degradation) and the parent-freshness stamp + frame.

Validation

Before After
Parent handoff ### t_bf69 (no age) ### t_bf69 (completed 18h ago) + "re-verify against source" frame
Comment at 2026-06-27 02:56 at 2026-06-27 02:56, 18h ago
Tests 392 kanban tests pass (run_tests.sh); ruff clean

No cache/alternation impact — this is worker-context rendering at spawn/kanban_show time only.

Infographic

kanban-handoff-freshness

…te as current

Multi-agent boards leak staleness: a sibling worker's parent handoff,
comment, or prior-attempt summary gets read by the next worker as live
truth even when it's a day old. build_worker_context surfaced the text
with (at best) a bare absolute timestamp, which an LLM reads as fact
regardless of age — parent results had no timestamp at all.

Adds a coarse relative-age stamp (just now / 18h ago / 3d ago) to every
recalled-state line and a one-line 'point-in-time snapshot, re-verify
against source' frame on the parent-results section, so the worker sees
when handoffs were produced and re-checks stale ones before acting.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-5393a555 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11611 on HEAD, 11608 on base (🆕 +3)

🆕 New issues (3):

Rule Count
unresolved-attribute 2
invalid-argument-type 1
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
run_agent.py:3017: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
tests/hermes_cli/test_kanban_core_functionality.py:1720: [invalid-argument-type] invalid-argument-type: Argument to function `_relative_age` is incorrect: Expected `int | None`, found `Literal["garbage"]`

✅ Fixed issues (1):

Rule Count
invalid-assignment 1
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`

Unchanged: 6090 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/feature New feature or request comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have labels Jun 28, 2026
@teknium1
teknium1 merged commit 3b23a98 into main Jun 28, 2026
30 checks passed
@teknium1
teknium1 deleted the hermes/hermes-5393a555 branch June 28, 2026 04:21
pai-scaffolde pushed a commit to pai-scaffolde/hermes-agent that referenced this pull request Jun 28, 2026
…te as current (NousResearch#53973)

Multi-agent boards leak staleness: a sibling worker's parent handoff,
comment, or prior-attempt summary gets read by the next worker as live
truth even when it's a day old. build_worker_context surfaced the text
with (at best) a bare absolute timestamp, which an LLM reads as fact
regardless of age — parent results had no timestamp at all.

Adds a coarse relative-age stamp (just now / 18h ago / 3d ago) to every
recalled-state line and a one-line 'point-in-time snapshot, re-verify
against source' frame on the parent-results section, so the worker sees
when handoffs were produced and re-checks stale ones before acting.
lenardhuebner88-rgb pushed a commit to lenardhuebner88-rgb/hermes-agent that referenced this pull request Jun 28, 2026
…te as current (NousResearch#53973)

Multi-agent boards leak staleness: a sibling worker's parent handoff,
comment, or prior-attempt summary gets read by the next worker as live
truth even when it's a day old. build_worker_context surfaced the text
with (at best) a bare absolute timestamp, which an LLM reads as fact
regardless of age — parent results had no timestamp at all.

Adds a coarse relative-age stamp (just now / 18h ago / 3d ago) to every
recalled-state line and a one-line 'point-in-time snapshot, re-verify
against source' frame on the parent-results section, so the worker sees
when handoffs were produced and re-checks stale ones before acting.

(cherry picked from commit 3b23a98)
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…te as current (NousResearch#53973)

Multi-agent boards leak staleness: a sibling worker's parent handoff,
comment, or prior-attempt summary gets read by the next worker as live
truth even when it's a day old. build_worker_context surfaced the text
with (at best) a bare absolute timestamp, which an LLM reads as fact
regardless of age — parent results had no timestamp at all.

Adds a coarse relative-age stamp (just now / 18h ago / 3d ago) to every
recalled-state line and a one-line 'point-in-time snapshot, re-verify
against source' frame on the parent-results section, so the worker sees
when handoffs were produced and re-checks stale ones before acting.
Jasper6439 pushed a commit to Jasper6439/hermes-agent that referenced this pull request Jul 5, 2026
…te as current (NousResearch#53973)

Multi-agent boards leak staleness: a sibling worker's parent handoff,
comment, or prior-attempt summary gets read by the next worker as live
truth even when it's a day old. build_worker_context surfaced the text
with (at best) a bare absolute timestamp, which an LLM reads as fact
regardless of age — parent results had no timestamp at all.

Adds a coarse relative-age stamp (just now / 18h ago / 3d ago) to every
recalled-state line and a one-line 'point-in-time snapshot, re-verify
against source' frame on the parent-results section, so the worker sees
when handoffs were produced and re-checks stale ones before acting.
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…te as current (NousResearch#53973)

Multi-agent boards leak staleness: a sibling worker's parent handoff,
comment, or prior-attempt summary gets read by the next worker as live
truth even when it's a day old. build_worker_context surfaced the text
with (at best) a bare absolute timestamp, which an LLM reads as fact
regardless of age — parent results had no timestamp at all.

Adds a coarse relative-age stamp (just now / 18h ago / 3d ago) to every
recalled-state line and a one-line 'point-in-time snapshot, re-verify
against source' frame on the parent-results section, so the worker sees
when handoffs were produced and re-checks stale ones before acting.
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…te as current (NousResearch#53973)

Multi-agent boards leak staleness: a sibling worker's parent handoff,
comment, or prior-attempt summary gets read by the next worker as live
truth even when it's a day old. build_worker_context surfaced the text
with (at best) a bare absolute timestamp, which an LLM reads as fact
regardless of age — parent results had no timestamp at all.

Adds a coarse relative-age stamp (just now / 18h ago / 3d ago) to every
recalled-state line and a one-line 'point-in-time snapshot, re-verify
against source' frame on the parent-results section, so the worker sees
when handoffs were produced and re-checks stale ones before acting.
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…te as current (NousResearch#53973)

Multi-agent boards leak staleness: a sibling worker's parent handoff,
comment, or prior-attempt summary gets read by the next worker as live
truth even when it's a day old. build_worker_context surfaced the text
with (at best) a bare absolute timestamp, which an LLM reads as fact
regardless of age — parent results had no timestamp at all.

Adds a coarse relative-age stamp (just now / 18h ago / 3d ago) to every
recalled-state line and a one-line 'point-in-time snapshot, re-verify
against source' frame on the parent-results section, so the worker sees
when handoffs were produced and re-checks stale ones before acting.
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…te as current (NousResearch#53973)

Multi-agent boards leak staleness: a sibling worker's parent handoff,
comment, or prior-attempt summary gets read by the next worker as live
truth even when it's a day old. build_worker_context surfaced the text
with (at best) a bare absolute timestamp, which an LLM reads as fact
regardless of age — parent results had no timestamp at all.

Adds a coarse relative-age stamp (just now / 18h ago / 3d ago) to every
recalled-state line and a one-line 'point-in-time snapshot, re-verify
against source' frame on the parent-results section, so the worker sees
when handoffs were produced and re-checks stale ones before acting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants