Repository navigation
fix(agent): create fresh OMP sessions without resume (ZIC-310) - #9131
Merged
Bohan-J merged 1 commit intoOct 9, 2026
Merged
Conversation
Co-authored-by: multica-agent <github@multica.ai>
|
@vicksiyi is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
Bohan-J
approved these changes
Oct 9, 2026
Bohan-J
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the clear reproduction and focused fix! Separating fresh OMP session creation from explicit resume preserves existing session paths and locking while keeping Pi's startup behavior unchanged.
I reran the agent package tests, daemon resume-related tests, and the real OMP startup smoke test on 18.8.5. Additional startup checks passed on 17.2.12 and 18.8.5, including loading a session header emitted by the older version in the newer one. These CLI checks did not make model calls; the two-turn persistence regression uses a simulated runtime. Approved.
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.
What does this PR do?
Fix fresh Oh-My-Pi chat and quick-create runs failing immediately on OMP 18.8.3. The shared Pi adapter pre-created an empty JSONL and passed it as
--session; OMP treats that flag as strict resume and refuses the file before processing the prompt.Fresh OMP runs now use
--session-dirwith a private directory under Multica's session store. After the process exits, the adapter returns the persisted JSONL path for the next turn. Existing OMP sessions retain explicit path-based resume and locking; Pi retains its existing startup behavior.Related Issue
Closes #9124
Multica: ZIC-310
Type of Change
Changes Made
server/pkg/agent/pi.go.omp_session.go. Custom arguments cannot redirect session selection or disable persistence.The transcript remains beside OMP's companion artifacts. A completed process without exactly one nonempty root JSONL is reported as failed instead of publishing a fabricated resume path. This assumes OMP's documented session-directory layout; multiple root transcripts fail explicitly rather than selecting arbitrary history. No schema, API, or Pi behavior changes.
How to Test
cd server && go test ./pkg/agent -count=1— passed.go test -race ./pkg/agent -run 'Test(OmpFreshSession|BuildOmpArgsOwnsSessionSelection|FindOmpSessionFile)' -count=1— passed.go test ./internal/daemon -run 'Test.*(PiSession|Omp|Resume)' -count=1— passed.omp exited with error: exit status 1and passes with this fix.MULTICA_RUN_REAL_AGENT_SMOKE=1 MULTICA_OMP_SMOKE_EXECUTABLE=/path/to/omp go test -tags=agentintegration ./pkg/agent -run '^TestOmpSessionStartupWithoutModelCall$' -count=1 -v— passed against the SHA-256-verified OMP 18.8.3 macOS ARM64 release: empty resume rejected; fresh startup and valid-header resume succeeded. Uses an isolated home/config, empty stdin, and no model request. Persistence across actual prompt turns is covered by the fake-runtime regression above; no paid/live model turn was run.make worktree-envsucceeded.make check-worktreestopped at PostgreSQL setup because Docker is unavailable. The script's exit trap printed a misleading success message/exit code; the full pipeline did not run. Focused Go checks above used Go 1.26.6.Checklist
apps/web/features/landing/i18n/) and relevant docs (apps/docs/content/docs/)apps/docs/content/docs/developers/conventions.zh.mdx(terminology, mixed-rule fortask/issue/skill)UI, copy, and new-runtime documentation items do not apply.
AI Disclosure
AI tool used: Codex through Multica.
Prompt / approach: Investigate #9124, trace OMP 18.8.3's session creation/resume contract, reproduce the original adapter failure, preserve subsequent turns, and add focused regression coverage without making a model request.