fix(coding-agent): report session id alongside path to herdr - #1269
Open
witt3rd wants to merge 1 commit into
Open
fix(coding-agent): report session id alongside path to herdr#1269witt3rd wants to merge 1 commit into
witt3rd wants to merge 1 commit into
Conversation
The builtin herdr reporter captured the resumable session ref correctly but sent only agent_session_path when the session was persisted. Herdr's report handler accepts paths only for the pi/omp labels; for the prime-agent label it reads agent_session_id, so the ref was silently dropped and panes never became resumable. Report both identity forms so the session registers on current herdr (via id) and on path-accepting herdr (via path). fixes PrimeIntellect-ai#1260
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The builtin herdr reporter captured the resumable session ref correctly but sent only
agent_session_pathwhen the session was persisted. Herdr's report handler accepts paths only for thepi/omplabels; for theprime-agentlabel it readsagent_session_id, so the ref was silently dropped and panes never became resumable (agent_sessionstayed null, noprime-agent --resumeon herdr-server restart).The reporter now sends both
agent_session_idandagent_session_pathon every report, so the session registers on current herdr (via id) and on path-accepting herdr (via path).Fixes #1260.
Root cause notes
SessionManager.create, which assigns the session file at construction, beforesession_startfires. A socket tap onHERDR_SOCKET_PATHshows the firstpane.report_agentalready carryingagent_session_path. The drop happens herdr-side, insession_ref_from_report.("herdr:pi","prime-agent")official source. The companion herdr-side fix (accept prime-agent paths, matching the snapshot/planner handling) is witt3rd/herdr@d524e4f1. This change stands alone: sending the id makes registration work regardless.Test plan
packages/coding-agent/test/suite/regressions/1260-herdr-session-ref.test.tsdrives the builtin extension against a real persistedSessionManagerand a fake herdr socket, asserting both identity forms on the report (fails without the fix).test/herdr-agent-state.test.tsassertions for both forms.npm run checkclean.agent_sessionregistered → herdr-server restart → pane relaunchesprime-agent --resume <ref>with session content intact.Note
Fix herdr reporter to include session id alongside session path in reports
Previously,
withSessionRefin herdr-agent-state.ts sent eitheragent_session_pathoragent_session_id, but not both. Now both fields are included inpane.report_agentrequests when available, allowing herdr to register a resumable session correctly.Macroscope summarized dafafe8.