Skip to content

A host with no session-start hook is handed where work left off on its first Logos call - #124

Merged
Coder8124 merged 1 commit into
mainfrom
first-call-resume
Nov 9, 2026
Merged

Coder8124 merged 1 commit into
mainfrom
first-call-resume

Conversation

@Coder8124

Copy link
Copy Markdown
Owner

In Claude Code the plugin's SessionStart hook opens every session with where the last agent stopped and what it ruled out. Claude Desktop, Copilot, and Cursor or Codex wired by hand have no such hook, so that handoff depended on the model choosing to call resume, the step it most often skips.

Now the first successful Logos tool result in such a session carries the handoff, after the tool's own answer, with one line saying why it is there.

  • Once per session. It counts as given only if the reply was actually sent; a cancelled call keeps it owed.
  • Skipped for hosts that already had a hook. For Claude Code that means the Logos plugin is installed at user scope and not disabled. For Cursor and Codex it means logos's session-start hook is in their hooks file. Both are read from disk, not assumed from the host name.
  • Skipped when the first call is resume or context. Those are the handoff already.
  • Skipped when the first call is checkpoint or handoff. After those, the latest checkpoint is the model's own.
  • Only the session's own project, and only one the vault already held when the call began. A write that creates the project is never handed back as an earlier agent's work, and resume's "most recent project" guess is never used.
  • Built inside the embedding-stall window, so a handoff built without embeddings says so.

The checkpoint at disconnect already existed (unsaved.go, #31), so it is not part of this change.

Tests: 10 in firstcall_test.go. Each positive test fails with its fix removed. go test ./... passes (46 ok), and so do vet, gofmt and the chaos tier. Exercised over stdio on a scratch vault as claude-ai and claude-code.

@Coder8124
Coder8124 merged commit 35320c6 into main Nov 9, 2026
12 checks passed
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