redhat-developer / redhat-developer/rhdh-fullsend

Fullsend waits for hard timeout after Claude emits successful result

Open
#26 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
2
Forks
7
Avg merge
1d 13h
Merged PRs (30d)
8

Description

Summary

A code-agent run completed its implementation, committed the change, validated its structured output, and emitted a successful Claude stream-json result. Fullsend nevertheless kept reporting Agent running until the exact 35-minute hard timeout because an auto-backgrounded Jest task was still marked as running.

The GitHub Actions job ultimately succeeded because Fullsend recovered the output and commit during post-processing, but it wasted about 21.5 minutes after the model had already completed.

Run: https://github.com/redhat-developer/rhdh-agentic/actions/runs/29257824641/job/86842795543

Related: #19 (auto-backgrounded test/retry behavior)

Timeline

  • 14:27:10.530Z — agent process started
  • 14:33:34.923Z — agent ran yarn test with a 120-second Bash timeout
  • 14:35:35.149Z — Claude Code auto-backgrounded the command as task b3jjxrrgf
  • 14:37:38.237ZTaskOutput timed out with status: running, even though the output showed all 5 tests passed
  • Agent said Let me stop the task and proceed, but did not invoke TaskStop
  • 14:40:29.648Z — final fullsend-check-output tool call started
  • 14:40:29.950Z — validation returned successfully (~302 ms)
  • 14:40:38.636Z — Claude emitted its final answer
  • Raw output.jsonl contains a terminal type: "result", subtype: "success", terminal_reason: "completed", and duration_ms: 807613
  • 15:02:10.559Z — Fullsend reached the exact 35-minute limit and reported Agent exited with code -1

That is roughly 21m32s of idle waiting after Claude had completed successfully.

Misleading progress annotation

The last visible tool annotation was:

Notice: Bash: fullsend-check-output (13m19s, 80 tools)

This looks like fullsend-check-output ran for 13m19s. It actually ran for about 302 ms. 13m19s is cumulative session elapsed time, and 80 tools is the cumulative tool count.

Suggested wording:

Bash: fullsend-check-output (13m19s elapsed, tool #80)

Root cause

The immediate leak was the test command:

cd .../plugins/agent-common && yarn test 2>&1

The tests finished, but the Backstage/Jest command remained alive in watch-like mode. Claude Code auto-backgrounded it when the Bash timeout elapsed. The task was never stopped, so the Claude CLI process did not exit even after writing a successful terminal result.

Expected behavior

Once Fullsend receives a terminal stream-json record such as:

{
  "type": "result",
  "subtype": "success",
  "terminal_reason": "completed"
}

it should treat the agent as completed, terminate/clean up any remaining child or background processes, and proceed to extraction/post-processing without waiting for the hard timeout.

Proposed fixes

  1. In the Fullsend runtime, stop waiting for process exit after receiving a terminal successful result; terminate the CLI process/process group and clean up background children.
  2. Ensure timeout cleanup kills the whole process group, not only the foreground wrapper.
  3. Update code-agent guidance to run Jest non-interactively, for example CI=true yarn test --watchAll=false.
  4. Require agents to invoke TaskStop for any verification command that was auto-backgrounded before finishing.
  5. Clarify progress annotations so cumulative elapsed time is not presented like individual tool duration.

Acceptance criteria

  • A successful terminal result advances immediately to artifact extraction even if a child test process remains alive.
  • Background child processes are cleaned up.
  • The run does not wait until the configured agent timeout in this scenario.
  • Tool annotations distinguish total session elapsed time from per-tool duration.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the Fullsend runtime handling of Claude stream-json records and process cleanup, using the linked Actions run and raw output.jsonl as the reproduction evidence. Verify behavior when a successful terminal result arrives while a background Jest process remains alive. Done means extraction starts immediately, child processes are cleaned up, the hard timeout is avoided, and tool annotations distinguish elapsed session time from per-tool duration.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, github-actions, javascript
Domain
ci-cd, devtools, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.