-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add both interactive and autonomous resume commands in logs #1053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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. |
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
GitHub comments only mention the
--auto-continue-on-limit-resetoption, which works for all ways to call the solver (Telegram bot, CLI, etc.).Logs now show both interactive and autonomous resume commands:
Changes
buildClaudeAutonomousResumeCommandinsrc/claude.command-builder.lib.mjssrc/solve.mjsto show both resume commands in logssrc/solve.results.lib.mjsshowSessionSummary to show both commandssrc/claude.lib.mjsshowResumeCommand and formatUsageLimitMessage callssrc/usage-limit.lib.mjsformatUsageLimitMessage for dual command supportTest Plan
test-build-resume-command.mjstests pass (28 tests)test-usage-limit.mjstests pass (25 tests)References
Fixes #942
🤖 Generated with Claude Code