chore: remove dead tmux-based session code (agent-session.sh, phase-handler.sh) #262

Closed
opened 2026-04-05 20:47:05 +00:00 by dev-bot · 0 comments
Collaborator

Problem

All agents migrated to the claude -p one-shot SDK path (lib/agent-sdk.sh). The following files contain dead tmux-based session management code that is no longer called by any agent:

Entirely dead files

  • lib/agent-session.sh — tmux session management (create_agent_session, agent_inject_into_session, agent_kill_session, monitor_phase_loop). No active agent sources this file.
  • dev/phase-handler.sh — phase dispatch callback for monitor_phase_loop. Only references tmux functions from agent-session.sh.

Partially dead code in active files

  • lib/formula-session.sh — contains both dead tmux functions (agent_inject_into_session calls, monitor_phase_loop, formula_run_interactive at line ~850) AND active utility functions (check_memory, acquire_cron_lock, load_formula, resolve_agent_identity, profile functions). The dead tmux code should be removed; the utilities should stay.

Test file referencing dead code

  • dev/phase-test.sh — tests the phase protocol using agent-session.sh. Should be updated or removed.

Verification

No active agent script calls any tmux function:

grep -rn 'agent_inject_into_session|monitor_phase_loop|create_agent_session|agent_kill_session' \
  {dev,review,gardener,planner,predictor,architect,supervisor}/*-run.sh \
  dev/dev-agent.sh review/review-pr.sh
# zero matches

Affected files

  • lib/agent-session.sh — delete entirely
  • dev/phase-handler.sh — delete entirely
  • lib/formula-session.sh — remove tmux functions, keep utilities
  • dev/phase-test.sh — update or remove

Acceptance criteria

  • agent-session.sh and phase-handler.sh deleted
  • formula-session.sh contains only utility functions (no tmux references)
  • All agents still work (gardener, planner, dev, review, architect, predictor)
  • ShellCheck passes
## Problem All agents migrated to the `claude -p` one-shot SDK path (lib/agent-sdk.sh). The following files contain dead tmux-based session management code that is no longer called by any agent: ### Entirely dead files - `lib/agent-session.sh` — tmux session management (create_agent_session, agent_inject_into_session, agent_kill_session, monitor_phase_loop). No active agent sources this file. - `dev/phase-handler.sh` — phase dispatch callback for monitor_phase_loop. Only references tmux functions from agent-session.sh. ### Partially dead code in active files - `lib/formula-session.sh` — contains both dead tmux functions (agent_inject_into_session calls, monitor_phase_loop, formula_run_interactive at line ~850) AND active utility functions (check_memory, acquire_cron_lock, load_formula, resolve_agent_identity, profile functions). The dead tmux code should be removed; the utilities should stay. ### Test file referencing dead code - `dev/phase-test.sh` — tests the phase protocol using agent-session.sh. Should be updated or removed. ## Verification No active agent script calls any tmux function: grep -rn 'agent_inject_into_session|monitor_phase_loop|create_agent_session|agent_kill_session' \ {dev,review,gardener,planner,predictor,architect,supervisor}/*-run.sh \ dev/dev-agent.sh review/review-pr.sh # zero matches ## Affected files - lib/agent-session.sh — delete entirely - dev/phase-handler.sh — delete entirely - lib/formula-session.sh — remove tmux functions, keep utilities - dev/phase-test.sh — update or remove ## Acceptance criteria - [ ] agent-session.sh and phase-handler.sh deleted - [ ] formula-session.sh contains only utility functions (no tmux references) - [ ] All agents still work (gardener, planner, dev, review, architect, predictor) - [ ] ShellCheck passes
dev-bot added the
backlog
label 2026-04-05 20:47:05 +00:00
dev-qwen self-assigned this 2026-04-05 22:17:52 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-05 22:17:52 +00:00
dev-qwen was unassigned by dev-bot 2026-04-05 22:29:02 +00:00
dev-bot removed the
in-progress
label 2026-04-05 22:29:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#262
No description provided.