feat: add both interactive and autonomous resume commands in logs#1053
feat: add both interactive and autonomous resume commands in logs#1053
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #942
When usage limit is reached or Claude command fails, the log now shows the Claude CLI resume command instead of the solve.mjs command: Before: /home/hive/.nvm/versions/node/v20.19.6/bin/node /home/hive/.bun/bin/solve https://... --resume session-id After: (cd "/tmp/gh-issue-solver-..." && claude --resume session-id) This allows users to resume directly using Claude CLI in interactive mode after the limit resets. The command is also captured in the logs that get uploaded to PR comments, making it easy for users to find and use. Changes: - Modified formatUsageLimitMessage call to use buildClaudeResumeCommand - Modified failure message to use buildClaudeResumeCommand - Both now generate the (cd ... && claude --resume ...) pattern Fixes #942 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
c55a814 to
249646e
Compare
This reverts commit f60a445.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
No commands should be in GitHub comment. We may only suggest user to use and option because our users do not call CLI commands, they are calling /solve command via telegram bot. So option will work, but we should not also mention /solve command, because we should just inform about the option, so the test will be valid for all ways to call. As for claude command copiable command, we should make sure it is in logs, not in the comment itself. I mean logs are either the link, or in collapsed block, not immediately visible by the user. |
|
🤖 AI Work Session Started Starting automated work session at 2026-01-02T21:56:53.719Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Per reviewer feedback, bash commands should not appear in GitHub comments because users interact via Telegram bot, not CLI. Now: - GitHub comments only mention the --auto-continue-on-limit-reset option - Resume commands are kept in logs (collapsed block or gist link) - Session ID is still shown for reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
I think in all places of this feature we should support interactive --resume command and also fully autonomous --resume command with all prompt and system message and so on preparated as single line command that user can just easily copy. So both commands (short interactive and large autonomous) should be shown, both just execute |
|
🤖 AI Work Session Started Starting automated work session at 2026-01-11T01:48:21.188Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Resolved conflict in src/solve.mjs: - Kept the --auto-continue-on-limit-reset option suggestion (no CLI commands in GitHub comments) - Kept the formattedResetTime with relative time formatting from main 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements user feedback from PR #1053: - Added buildClaudeAutonomousResumeCommand for fully autonomous resumption - Both commands are now shown in all places where resume commands appear: - Interactive mode: Opens Claude Code for user interaction - Autonomous mode: Continues work without user interaction Changes: - src/claude.command-builder.lib.mjs: Added buildClaudeAutonomousResumeCommand - src/solve.mjs: Updated to show both resume command types - src/solve.results.lib.mjs: Updated showSessionSummary to show both commands - src/claude.lib.mjs: Updated showResumeCommand and formatUsageLimitMessage calls - src/usage-limit.lib.mjs: Updated formatUsageLimitMessage to support dual commands - tests/test-build-resume-command.mjs: Added tests for autonomous resume command - tests/test-usage-limit.mjs: Added tests for dual command format Related: #942 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
We need to resolve conflicts and also should apply experience from #1139 here. Ensure all changes are correct, consistent and fully meet the requirements. |
|
🤖 AI Work Session Started Starting automated work session at 2026-01-19T22:14:33.991Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Per PR requirements, GitHub comments should only mention the --auto-continue-on-limit-reset option and session ID, but not include actual resume commands. Resume commands are still shown in the console logs and attached gist/log files. This ensures: - GitHub comments remain clean and focused on actionable options - Advanced users can find resume commands in logs/gists - The session ID is always available for manual lookups Related to issue #942. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Get latest changes in the code, and double check that flow is fully supported or not. If the fix is still up to date and was not applied previously in the code, we should reapply it for new version of code, while making sure all discussed requirements are met. We need to ensure all changes are correct, consistent, validated, tested, logged and fully meet all discussed requirements (check issue description and all comments in issue and in pull request). Ensure all CI/CD checks pass. |
|
🤖 AI Work Session Started Starting automated work session at 2026-03-29T11:40:54.955Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
Resolved merge conflicts integrating new features from main (auto-resume/restart modes, model imports, formatted reset times) while preserving dual resume command support (interactive + autonomous) in logs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Compacted the dual resume command output (interactive + autonomous) to fit within the 1500 line limit for .mjs files while preserving all functionality. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (2772KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Summary
Fixes an issue where bash commands were displayed in GitHub comments instead of only in the logs, and implements dual resume command support.
Problem
When usage limit was reached, the GitHub comment showed bash commands like:
This was not user-friendly because users interact via Telegram bot, not CLI commands directly.
Solution
Logs now show both interactive and autonomous resume commands:
GitHub comments use appropriate messaging based on auto-resume/restart mode status, without showing raw CLI commands when not needed.
formatUsageLimitMessagesupports dual commands with backward compatibility for legacyresumeCommandparameter.Changes
buildClaudeAutonomousResumeCommandinsrc/claude.command-builder.lib.mjssrc/claude.lib.mjsto import autonomous command builder alongside new model importssrc/solve.mjsto show both resume commands in logs and import new helperssrc/solve.results.lib.mjsshowSessionSummary to show both commandssrc/usage-limit.lib.mjsformatUsageLimitMessage for dual command supportTest Plan
test-build-resume-command.mjstests pass (28 tests)test-usage-limit.mjstests pass (71 tests)References
Fixes #942
🤖 Generated with Claude Code