Session Persistence
Medium
- Category
- Rogue Agent
- Content
### §2.1 后台化(防进程被杀) - 长任务(打包/上传/批量处理)禁止在前台直接跑:平台网关常有 2-10 分钟超时,超时杀进程 → 留下半成品文件 - 标准模式:`setsid nohup <cmd> > /tmp/task.log 2>&1 &`,然后轮询日志/文件时间戳确认进度 - 佐证数据:同一个备份脚本,前台跑两次两次被杀,后台跑零事故 ### §2.2 半成品的危害大于失败
- Confidence
- 80% confidence
- Finding
- `nohup` is recommended here as part of a persistence pattern for unattended shell execution. Although the intent is reliability, it reduces operator control and can mask continued execution after a tool timeout or disconnect, which is risky in agent systems that may issue commands with destructive side effects.
