liu-qingyuan
2d020f3f23
fix(tmux): align deferred attach behavior after rebase
2026-02-20 07:13:33 +08:00
liu-qingyuan
12bda2d08b
fix(tmux): address review feedback for split/defer reliability
2026-02-20 07:09:49 +08:00
liu-qingyuan
7bfbea1a06
fix(tmux): prefer split-or-defer with FIFO deferred attach
2026-02-20 07:09:49 +08:00
YeonGyu-Kim
c7ed266806
fix: stop tracking sessions that never become ready
...
When session readiness times out, immediately close the spawned pane and skip tracking to prevent stale mappings from causing reopen and close anomalies.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-02-17 03:40:55 +09:00
YeonGyu-Kim
2090742869
refactor: remove unused constants and dead pollSessions from tmux-subagent
2026-02-16 22:11:00 +09:00
YeonGyu-Kim
0b10245c34
refactor: create normalizeSDKResponse helper and replace scattered patterns across 37 files
2026-02-16 18:20:19 +09:00
YeonGyu-Kim
996503b1f4
feat(shared/git-worktree, features): add git diff stats utility and infrastructure improvements
...
- Add collect-git-diff-stats utility for git worktree operations
- Add comprehensive test coverage for git diff stats collection
- Enhance claude-tasks storage module
- Improve tmux subagent manager initialization
- Support better git-based task tracking and analysis
🤖 Generated with assistance of OhMyOpenCode
2026-02-08 18:41:45 +09:00
YeonGyu-Kim
c40631d611
refactor(tmux-subagent): split manager.ts into focused modules
...
- Extract polling logic to polling-manager.ts
- Extract session cleanup to session-cleaner.ts
- Extract session spawning to session-spawner.ts
- Extract cleanup logic to manager-cleanup.ts
- Reduce manager.ts from ~495 to ~345 lines
- Follow modular code architecture (200 LOC limit)
🤖 Generated with assistance of OhMyOpenCode
2026-02-08 17:51:38 +09:00
itsmylife44
97f5d8e824
fix(tmux): send Ctrl+C before kill-pane and respawn-pane to prevent orphaned processes ( #1329 )
...
* fix(tmux): send Ctrl+C before kill-pane and respawn-pane to prevent orphaned processes
* fix(tmux-subagent): prevent premature pane closure with stability detection
Implements stability detection pattern from background-agent to prevent
tmux panes from closing while agents are still working (issue #1330 ).
Problem: Session status 'idle' doesn't mean 'finished' - agent may still
be thinking/reasoning. Previous code closed panes immediately on idle.
Solution:
- Require MIN_STABILITY_TIME_MS (10s) before stability detection activates
- Track message count changes to detect ongoing activity
- Require STABLE_POLLS_REQUIRED (3) consecutive polls with same message count
- Double-check session status before closing
Changes:
- types.ts: Add lastMessageCount and stableIdlePolls to TrackedSession
- manager.ts: Implement stability detection in pollSessions()
- manager.test.ts: Add 4 tests for stability detection behavior
* test(tmux-subagent): improve stability detection tests to properly verify age gate
- First test now sets session age >10s and verifies 3 polls don't close
- Last test now does 5 polls to prove age gate prevents closure
- Added comments explaining what each poll does
2026-02-01 19:11:35 +09:00
YeonGyu-Kim
026fd0f7b3
refactor(tmux-subagent): introduce dependency injection for testability ( #1267 )
...
Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com >
2026-01-30 10:59:54 +09:00
justsisyphus
4beae19c24
feat(tmux-subagent): add replace action to prevent mass eviction
...
- Add column-based splittable calculation (getColumnCount, getColumnWidth)
- New decision tree: splittable → split, k=1 eviction → close+spawn, else → replace
- Add 'replace' action type using tmux respawn-pane (preserves layout)
- Replace oldest pane in-place instead of closing all panes when unsplittable
- Prevents scenario where all agent panes get closed leaving only 1
2026-01-26 15:25:11 +09:00
justsisyphus
4eca083387
fix(tmux-subagent): enable 2D grid layout with divider-aware calculations
...
- Account for tmux pane dividers (1 char) in all size calculations
- Reduce MIN_PANE_WIDTH from 53 to 52 to fit 2 columns in standard terminals
- Fix enforceMainPaneWidth to use (windowWidth - divider) / 2
- Add virtual mainPane handling for close-spawn eviction loop
- Add comprehensive decision-engine tests (23 test cases)
2026-01-26 15:11:16 +09:00
justsisyphus
ac8b3c6143
refactor(tmux-subagent): state-first architecture with decision engine ( #1125 )
...
* refactor(tmux-subagent): add state-first architecture with decision engine
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* feat(tmux): add pane spawn callbacks for background and sync sessions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
---------
Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com >
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-01-26 12:02:37 +09:00
YeonGyu-Kim
14e0d0d506
Add tmux pane management for background agent sessions ( #1094 )
...
* feat(config): add TmuxConfigSchema for tmux subagent pane management
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* feat(shared): add tmux module structure
* feat(shared/tmux): implement tmux pane utilities
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* test(tmux-subagent): add TmuxSessionManager tests (TDD RED)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* feat(tmux-subagent): implement TmuxSessionManager
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* feat(integration): wire TmuxSessionManager with 500ms delay
- Task 5: Add 500ms delay in BackgroundManager after session creation
- Task 6: Wire TmuxSessionManager event handlers (session.created/deleted)
- Both changes integrate tmux pane management into plugin lifecycle
Co-authored-by: Sisyphus <ultrawork@oh-my-opencode>
---------
Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com >
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
Co-authored-by: Sisyphus <ultrawork@oh-my-opencode>
2026-01-25 15:34:10 +09:00