Skip to content

Make Claude session identity durable across recovery and automation - #878

Merged
danshapiro merged 133 commits into
mainfrom
feat/freshclaude-session-identity
Oct 24, 2026
Merged

danshapiro merged 133 commits into
mainfrom
feat/freshclaude-session-identity

Conversation

@danshapiro

Copy link
Copy Markdown
Owner

Freshclaude and Kilroy establish a durable native UUID before the first prompt. Create, /clear, recovery, rollback, fork, saved names and observer acknowledgements follow that identity. Native runtime history replaces placeholder bookkeeping while retaining legacy alias reads. A session created as A, cleared to B and restored after a server restart can be closed through A without leaving B running. Failed or cancelled closes release their guards, and recoverable restore errors retain the saved session identity.

Claude/Kilroy REST, CLI and MCP creation, splits, resume, input and capture share the browser's agent lane and saved settings. Publication is serialized with pane closure, and abandoned creates clean up only the runtime owned by their receipt. Retained fixtures execute the production sidecar over the SDK simulator or pinned real CLI.

OpenCode revival holds its ownership and session guards through restart publication, releasing ownership before waking session waiters so a completed revival cannot spuriously refuse a close. The Codex wrong-thread recovery test waits for real child registration and exit, checks terminal responses, and verifies the resume RPC. Managed-runtime test prerequisites compile before the startup deadline begins, and cloud verification streams progress without buffered-output limits.

Validation:

  • Complete Rust workspace and documentation tests in the disposable sandbox: 6,994 passed, zero failures; ten pre-existing ignored cases remain unchanged.
  • Configured-cloud client/tooling: 9,578 passed. Local server companion: 19 passed, with one existing opt-in smoke skipped. Source-runtime smoke: 10 passed in the sandbox. Electron: 395 passed.
  • Configured-cloud browser matrix: 148 selected browser cases passed; after the OpenCode revival fix, all seven affected scenarios passed with zero failures, skips or recovered retries.
  • Final Codex recovery fixture: all 229 related cases passed; strict all-target Clippy, formatting and independent review passed.
  • Normal pre-push checks passed: formatting, workspace Clippy, full typecheck, and the configured Rust test workload in the disposable sandbox.

Deploy Rust and the Claude sidecar together: send IPC now requires the user-message UUID, and creation establishes the native session ID.

# Conflicts:
#	crates/freshell-freshagent/src/lib.rs
…e-rest-lane

# Conflicts:
#	crates/freshell-freshagent/src/claude.rs
#	crates/freshell-ws/tests/common/claude_rig.rs
A late attach acknowledges the current native UUID and consumes its restart marker. A pending quiet deadline follows native history while retaining its exact process-owner fence. Regression tests fail before these changes and pass afterward: three attach statuses and four quiet deadline cases.
…sidecar

Replace hosted protocol emitters with the production constructor, index.mjs, SDK recorder, and contract simulator. Observe the actual fixed MCP recipe and configure requests; inject refusal only at SDK setModel. Preserve fresh/resume boot, actor journal, default-effort and plugin behavior. All 24 Claude-filtered session-host tests and all-target Clippy pass.
@danshapiro
danshapiro merged commit b5f8681 into main Oct 24, 2026
7 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