Severity: π portability
Discovered during the instawp box-to-box migration (2026-07-21).
Problem
Resume replays a persisted per-session env file (<connectors>/session-<id>.env, written by TerminalManager ~src/terminal.ts:2303, sourced by terminal/claude-launch.sh ~line 23 on RESUME=1). It stores absolute AGENT_DIR, MCP_CONFIG, HOOK, COMPANY_FILE. session-<id>.mcp.json likewise bakes absolute MCP server command paths.
After the data home moves, every stopped session dies at claude-launch.sh:36:
cd "$AGENT_DIR" || { red "agent folder not found: $AGENT_DIR"; exec bash; }
# agent folder not found: /home/vikas/tools/agent-os/data/agents/engineer
New sessions are fine (they recompute paths from the live home); only resume breaks.
Fix direction
- Persist these values home-relative and reconstruct absolutes against the current home at resume; or
- Recompute
AGENT_DIR/MCP_CONFIG/HOOK/COMPANY_FILE from the live manifest + home at resume instead of sourcing stale absolutes. The persisted file should only hold truly session-specific bits (CLAUDE_SESSION_ID, secret, agent id, task).
Workaround
docs/tenant-box-migration.md Β§4 sed-rewrites the connector session files post-move.
Severity: π portability
Discovered during the instawp box-to-box migration (2026-07-21).
Problem
Resume replays a persisted per-session env file (
<connectors>/session-<id>.env, written byTerminalManager~src/terminal.ts:2303, sourced byterminal/claude-launch.sh~line 23 onRESUME=1). It stores absoluteAGENT_DIR,MCP_CONFIG,HOOK,COMPANY_FILE.session-<id>.mcp.jsonlikewise bakes absolute MCP server command paths.After the data home moves, every stopped session dies at
claude-launch.sh:36:New sessions are fine (they recompute paths from the live home); only resume breaks.
Fix direction
AGENT_DIR/MCP_CONFIG/HOOK/COMPANY_FILEfrom the live manifest + home at resume instead of sourcing stale absolutes. The persisted file should only hold truly session-specific bits (CLAUDE_SESSION_ID, secret, agent id, task).Workaround
docs/tenant-box-migration.mdΒ§4 sed-rewrites the connector session files post-move.