>removedM
Resolved 💬 1 comment Opened Feb 17, 2026 by vshivram Closed Feb 18, 2026
Context
When using Claude Code agents for tasks that submit HPC/SLURM jobs, the current workflow is:
- Agent submits HPC job
- Agent writes job_id to signal file and exits
- External daemon monitors HPC job status
- When job completes, daemon spawns fresh agent to validate outputs
Potential Improvement
Instead of spawning a fresh agent, could we resume the same session that submitted the job? This would preserve:
- Context about what was submitted
- Any partial work/analysis done before submit
- Reasoning about expected outputs
Questions to Explore
- Can
claude --resume <session-id>be used programmatically? - How long do sessions persist?
- Is there an API to check session state before resuming?
- Would resuming be more cost-effective than fresh context?
Current Workaround
Daemon auto-kills agent after HPC submit and respawns with explicit "HPC job X COMPLETED" prompt. Works but loses session context.
Related
This is for the workaholic autonomous task daemon: https://github.com/[user]/workaholic
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗