Repository navigation
Claude engine: report and resume background agents cut off when claude -p exits - #20
Merged
Merged
Conversation
Nexus runs each message as `claude -p`. After Claude's reply, that process keeps background agents going for about 10 minutes and then exits, which stops them mid-task. The turn just ended and the agents showed as done, so Nexus looked like it cut out at random. - lib/nexus/bg-cutoff.js tracks sub-agent events after the result; if the process closes with them in flight, the turn reports it. - Those agents now show as stopped, not done, with a plain notice. - Nexus resumes them automatically on the same Claude session, up to 6 times per typed message (Esc stops it). - The claude engine is told about the limit and pointed at foreground agents or mcp__nexus__sessions for long work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude engine: say so and resume when background agents get cut off
Nexus runs each message as
claude -p. After Claude's reply, that processkeeps background agents going for about 10 minutes and then exits, which
stops them mid-task. The turn just ended and the agents showed as done,
so Nexus looked like it cut out at random.
process closes with them in flight, the turn reports it.
times per typed message (Esc stops it).
agents or mcp__nexus__sessions for long work.