-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix: unblock Archon when launched from a Claude Code terminal and on Bun 1.3+ #1097
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
Closed
samuelcombey
wants to merge
1
commit into
coleam00:dev
from
samuelcombey:fix/claude-sdk-env-and-telegraf-bun-compat
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| diff --git a/lib/core/network/client.js b/lib/core/network/client.js | ||
| index 25fbbbb47c7f88e83ae26f629e5ae1a0c141725c..7ee7bc4fc5e5d8fdb2f6307ecfdf0e3b932d1943 100644 | ||
| --- a/lib/core/network/client.js | ||
| +++ b/lib/core/network/client.js | ||
| @@ -245,7 +245,12 @@ async function answerToWebhook(response, payload, options) { | ||
| return true; | ||
| } | ||
| function redactToken(error) { | ||
| - error.message = error.message.replace(/\/(bot|user)(\d+):[^/]+\//, '/$1$2:[REDACTED]/'); | ||
| + // Bun frozen Error.message workaround: assignment may throw TypeError in Bun | ||
| + // runtimes where error.message is non-writable. Fall back to re-throwing the | ||
| + // original error rather than killing the polling loop. | ||
| + try { | ||
| + error.message = error.message.replace(/\/(bot|user)(\d+):[^/]+\//, '/$1$2:[REDACTED]/'); | ||
| + } catch (_) { /* message is read-only; re-throw original */ } | ||
| throw error; | ||
| } | ||
| class ApiClient { | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catching and ignoring failures in
redactTokenmeans Bun readonly-messageerrors are rethrown with the original unredacted text, which can include/bot<id>:<token>/and leak the Telegram bot token into logs. In this exact Bun 1.3+ path, the new behavior fixes retries but drops the security guarantee this function exists to provide; please keep retry behavior while still throwing a redacted error payload.Useful? React with 👍 / 👎.