Skip to content

fix(sessions): restore provider and working directory from live panes - #192

Closed
Lint111 wants to merge 1 commit into
Ark0N:masterfrom
Lint111:agent/split-session-restoration
Closed

fix(sessions): restore provider and working directory from live panes#192
Lint111 wants to merge 1 commit into
Ark0N:masterfrom
Lint111:agent/split-session-restoration

Conversation

@Lint111

Copy link
Copy Markdown
Contributor

Summary

  • persist each session provider as a tmux user option when a pane is created or respawned
  • recover provider and working-directory metadata from live panes during reconciliation
  • migrate legacy panes by inferring their provider once from the live process command
  • preserve explicit remote and Docker workspace metadata

Root cause

When mux-sessions.json was missing or contained an older recovered placeholder, reconciliation rebuilt an untracked pane with mode: "claude" and workingDir: process.cwd(). The tmux pane itself survived, but Codeman lost the provider and repository context needed to restore the session accurately.

The provider is now durable in @codeman-mode, while #{pane_current_path} supplies the live local working directory. Existing panes without the option are inferred from their process command and migrated back into tmux metadata. Stale restored-* paths are repaired even when Codeman restarts from a different server directory.

Safety and compatibility

  • provider values are constrained to the existing SessionMode allowlist
  • discovered mux names and pane paths continue through existing validation
  • process IDs are parsed as numbers before the ps fallback
  • remote and Docker sessions never replace their modeled workspace with a local pane path
  • legacy pid-only and path-bearing list output remains parseable

Commit structure

  1. fix(sessions): restore provider and working directory from live panes

Validation

  • npm test -- --run test/tmux-manager.test.ts (59 tests)
  • npm run typecheck
  • npm run lint
  • npm run build
  • npx prettier --check src/tmux-manager.ts test/tmux-manager.test.ts
  • git diff --check

Scope

This PR does not include working-directory mutation UI, repository-viewer changes, terminal history streaming, or browser terminal lifecycle caching.

@Ark0N

Ark0N commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Hi Lior, closing this one as part of a cleanup of the seventeen PRs currently open from you. The full explanation is in #173, and I would rather you read that one than this note, because it is the honest version and it is not a dismissal of your work.

The short form: sixteen PRs opened in a single day, roughly 42,000 added lines in total, landing mostly on the same few files (nine touch app.js, eight touch terminal-ui.js), with five already conflicting against master and none carrying CI results. I cannot review that at the standard this codebase needs, and merging it at a lower standard would be worse than not merging it.

Going forward, please keep no more than three open PRs at a time, each one a single behavior change that stands on its own, with a test that fails on master and passes with the fix. #214 and #215, merged today, are good models.

If this particular change fixes something that genuinely annoys you in daily use, it is a good candidate to be the first one you reopen on its own, rebased on current master. I will review it properly.

Thanks for the effort you put in, and sorry to close it this way.

@Ark0NArk0N closed this Aug 5, 2026
Sign up for freeto 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.

2 participants

@Lint111@Ark0N