Skip to content

feat: continue project and global assistant sessions - #1

Merged
gregpriday merged 1 commit into
mainfrom
feature/continue-assistant-sessions
Nov 22, 2026
Merged

gregpriday merged 1 commit into
mainfrom
feature/continue-assistant-sessions

Conversation

@gregpriday

Copy link
Copy Markdown
Contributor

Continue in another agent… now works on Daintree's assistants as well as worker panes, which is the acceptance test of daintreehq/daintree#18136. It uses the core pieces from daintreehq/daintree#18138-#18141 and daintreehq/daintree#18150, so it needs Daintree 0.52.0.

What changes

  • Project assistant sessions. The item is on the session menu in the Assistant panel. The session is converted as before, and the other CLI starts as a new assistant session in the same project through help.newSessionWithAgent, with the hand-off as its first turn. The old session stays open.
  • Search for the new session. A new assistant session's terminal isn't known before it starts, so search is granted to the project's Daintree Assistant (consumer: "assistant" in the same project). The grant is held in memory while a start is in flight, so the session can search from its first turn. It's persisted only once a start succeeds, so a failed start never withdraws one that worked. Without the Assistant's access to plugin tools, the hand-off tells it to read the session file instead.
  • The global assistant. It's handed no plugin tools, so nothing is indexed. The session is read for the hand-off, and help.replaceGlobalAssistant is asked with the clicked session's terminalId. Daintree's own confirmation shows the hand-off and which agent stops, and only the coordinating session can be replaced (fix(actions): replace the global assistant only from its own hand-off daintree#18150).
  • Unavailable with a reason. Both menu items set availability. When the session file isn't known yet, the agent isn't Codex or Claude Code, the session hasn't started, or it's a scratch workspace's assistant, the item stays visible and greyed out with a short reason.
  • Hand-offs Daintree accepts. Quoted text loses control characters, and timestamps that aren't one are left out. Paths and ids escape control characters. Assistant hand-offs are held to 16,384 UTF-16 units, emoji included.
  • Timeouts. A dispatch Daintree didn't answer in time is reported as possibly still starting, with no blind Retry.
  • Toolchain. The SDK and CLI tarballs are repacked from Daintree develop (4430b2add0), since npm still serves 0.1.0. engines.daintree is >=0.52.0, and the version is 0.2.0.

Releasing

Don't tag v0.2.0 until Daintree 0.52.0 is out: on 0.51.0 the manifest's assistant location and availability fields don't exist. After that release, repack toolchain/ from the tag as toolchain/README.md says.

Testing

  • npm run check: typecheck, 98 tests (up from 73), manifest validation, all passing. npm run package builds the .dntr, and dist/index.mjs loads with activate.
  • New flow tests cover:
    • project assistant start, decline, first-turn search, lanes-full with Retry, and two overlapping starts where the failure comes after a success
    • timeouts and a dispatch the host stopped answering
    • wrong-project and not-started refusals with no lookup
    • the global hand-off keeping nothing on disk, core's refusal passed through, and an unknown session file
    • availability answers, including no lookup where none is needed
  • Removing the in-flight hold, or the persist-on-start, fails the expected tests.
  • Not run in a live Daintree build yet.

- Offer Continue in another agent on the Assistant panel's session menus, greyed out with a short reason when a session can't be continued
- Continue a project assistant session as a new assistant session in the same project, granting search to that project's assistant once a start succeeds
- Continue the global assistant from a hand-off alone: Daintree asks before replacing the coordinating session, and nothing is indexed
- Keep assistant hand-offs within Daintree's length and character rules
- Repack the toolchain from Daintree develop and require Daintree 0.52.0; version 0.2.0
@gregpriday
gregpriday merged commit a4801d6 into main Nov 22, 2026
1 check 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