Agentic orchestrator for parallel coding agents — plans tasks, spawns agents, and autonomously handles CI fixes, merge conflicts, and code reviews.
agent-fleetagent-swarmclaude-codecodex-cligit-worktreesmulti-agentorchestrationorchestratorparallel-agentsparallel-codingskillstmux
* feat: implement DirectTerminal with XDA clipboard support
Fixes clipboard functionality in web terminal without requiring iTerm2 attachment.
## Problem
Browser clipboard (Cmd+C/Ctrl+C) only worked when an iTerm2 client was attached
to the tmux session. Users had to keep iTerm2 tabs open in the background for
clipboard to work in the web dashboard.
## Root Cause
- tmux uses XDA (Extended Device Attributes) queries to detect terminal capabilities
- xterm.js doesn't implement XDA (marked as TODO in their codebase)
- Without XDA response, tmux doesn't enable clipboard support (TTYC_MS)
- iTerm2 responds to XDA, enabling clipboard for the entire session
## Solution
Implemented DirectTerminal component with custom XDA handler:
- Registers CSI > q handler using xterm.js parser API
- Responds with XTerm identification: DCS > | XTerm(370) ST
- tmux detects "XTerm(" and enables clipboard capability
- OSC 52 sequences flow: tmux → WebSocket → xterm.js → navigator.clipboard
## Changes
- Add DirectTerminal component with XDA handler
- Add direct-terminal-ws WebSocket server using node-pty
- Replace Terminal with DirectTerminal in SessionDetail
- Add comprehensive test page at /dev/terminal-test documenting:
- Root cause analysis
- Implementation details
- Node version requirements (requires Node 20.x due to node-pty)
- Debugging journey and lessons learned
- Fix ttyd port recycling to prevent EADDRINUSE errors
## Testing
Visit http://localhost:3000/dev/terminal-test for side-by-side comparison
and complete documentation.
Investigation time: 12+ hours (Feb 15-16, 2026)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: lint and typecheck errors
- Remove unused expectedWidth variable in DirectTerminal
- Add test files to eslint ignores
* fix: wrap useSearchParams in Suspense boundary
- Add Suspense wrapper to /dev/terminal-test page
- Add Suspense wrapper to /test-direct page
- Fixes Next.js build prerender error
* fix: address Bugbot review comments
- Fix useEffect cleanup memory leak in DirectTerminal
- Remove accidentally committed build artifacts
- Remove test scripts from repository root
- Add build/ to .gitignore
* fix: address additional Bugbot comments
- Re-enable mouse mode in ttyd terminal (was temporarily disabled)
- Fix hardcoded macOS paths in direct-terminal-ws
- Use 'tmux' from PATH instead of hardcoded /opt/homebrew/bin/tmux
- Use os.userInfo() for username fallback instead of 'equinox'
- Use process.env.PATH for cross-platform compatibility
Note: Bugbot comment about XDA response is incorrect - terminal.write()
is the correct API for responding to XDA queries. The implementation works
as confirmed by user testing.
* perf: fix slow terminal scrolling
- Remove status and error from useEffect dependencies (was recreating terminal on every state change)
- Add scroll performance settings: scrollSensitivity, fastScrollModifier
- Terminal now only recreates when sessionId changes
* fix: pass startFullscreen prop to DirectTerminal in SessionDetail
The fullscreen query parameter was being read from URL but not passed
through to the DirectTerminal component. This caused the fullscreen=true
query param to be ignored when viewing session detail pages.
Fixes:
- Pass startFullscreen prop from SessionDetail to DirectTerminal
- Enables ?fullscreen=true to work on session detail pages
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: enable mouse mode for DirectTerminal scrolling
DirectTerminal was not scrollable because tmux mouse mode was not enabled
for the sessions. The ttyd implementation already had this, but the
DirectTerminal WebSocket server was missing it.
Changes:
- Add spawn import from node:child_process
- Enable tmux mouse mode on session connection
- Hide tmux status bar for cleaner appearance
This makes DirectTerminal scrolling work the same as ttyd terminals.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: reduce scroll speed in DirectTerminal for smoother experience
Reduced scroll sensitivity from 3 to 1 lines per wheel tick for more
natural scrolling behavior. Also reduced fast scroll (with Alt) from 5 to 3.
Changes:
- scrollSensitivity: 3 → 1 (normal scroll speed)
- fastScrollSensitivity: 5 → 3 (Alt+scroll speed)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: auto-select two different sessions for terminal test page
When no query params are provided, the test page now automatically fetches
available sessions and picks two different ones for side-by-side comparison.
This avoids port conflicts between ttyd and DirectTerminal by default.
Changes:
- Fetch sessions from /api/sessions on mount
- Use first two available sessions as defaults (or fall back to hardcoded)
- Query params still work for manual override
- Warning only shows when sessions are actually the same
Examples:
- /dev/terminal-test (auto-picks two sessions)
- /dev/terminal-test?old_session=X&new_session=Y (manual override)
- /dev/terminal-test?session=X (uses same session for both)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: filter out terminated sessions in terminal test auto-selection
The auto-selection was picking terminated/exited sessions, causing
WebSocket connection failures when trying to attach to non-existent
tmux sessions (PTY exit code 1).
Now filters to only use sessions with activity !== "exited" for
auto-selection, ensuring terminals can actually connect.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: add server-side active session filtering to API
Instead of filtering terminated sessions on the client, added proper
API support with ?active=true query parameter to filter server-side.
Changes:
- GET /api/sessions?active=true - Returns only non-exited sessions
- Updated terminal test page to use new API parameter
- Properly maintains session/dashboard alignment during filtering
- Removed client-side filtering logic
This is cleaner, more efficient, and follows proper API design patterns.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* refactor: replace magic strings with ACTIVITY_STATE constants
Added ACTIVITY_STATE constants to @composio/ao-core types and replaced
all hardcoded "exited", "waiting_input", "blocked" strings with proper
constants throughout the codebase.
Changes:
- Added ACTIVITY_STATE constant object to core/types.ts
- Replaced magic strings in API route (/api/sessions)
- Replaced magic strings in lib/types.ts (getAttentionLevel)
- Properly typed constants with satisfies Record<string, ActivityState>
This prevents typos, improves IDE autocomplete, and makes refactoring
easier by having a single source of truth for activity state values.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: move WebSocket servers outside src/ to fix webpack build error
Moved terminal-websocket.ts and direct-terminal-ws.ts from src/server/
to server/ (outside src/) to prevent Next.js webpack from trying to
bundle them with client code.
These are standalone Node.js WebSocket servers (not Next.js API routes)
that should not be part of the Next.js build. Webpack was failing when
encountering node:child_process imports.
Changes:
- Moved src/server/*.ts to server/*.ts
- Updated package.json scripts to point to new location
Fixes: Module build failed: UnhandledSchemeError with node:child_process
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: update server file path in terminal test page docs
Updated documentation to reflect new server file location after moving
files from src/server/ to server/.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: import from @composio/ao-core/types to avoid bundling server code
The main @composio/ao-core export includes tmux utilities that use
node:child_process, which webpack cannot bundle for the client.
The package already exports a /types entry point that only includes
types and constants (no server utilities).
Changes:
- Import from @composio/ao-core/types instead of @composio/ao-core
- This prevents webpack from trying to bundle tmux.js in client code
Fixes webpack error: UnhandledSchemeError with node:child_process
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: combine duplicate imports to resolve lint errors
* fix: update .env.local.example to match code defaults (port 3003)
Addresses bugbot comment: Documentation showed port 3002 but both
server (direct-terminal-ws.ts) and client (DirectTerminal.tsx) default
to 3003. This mismatch could cause connection failures if developers
set only DIRECT_TERMINAL_PORT without NEXT_PUBLIC_DIRECT_TERMINAL_PORT.
Updated documentation to reflect actual code defaults.
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
|
||
|---|---|---|
| .changeset | ||
| .cursor | ||
| .github/workflows | ||
| artifacts | ||
| packages | ||
| scripts | ||
| .gitignore | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc | ||
| CLAUDE.md | ||
| CLAUDE.orchestrator.md | ||
| DASHBOARD_FIXES_SUMMARY.md | ||
| LICENSE | ||
| agent-orchestrator.yaml | ||
| agent-orchestrator.yaml.example | ||
| eslint.config.js | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| tsconfig.base.json | ||