You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0538b73
Browse filesBrowse the repository at this point in the historyBrowse files
Log agent output, and stop output capture from breaking logging
ClaudeR 0.14.1. Two problems from a user report.
Agent output was never logged. log_code_to_file() is called before the
code runs, so the entry could only ever hold the code. The executed
output is already captured for the response, so it is now appended to
the log entry as well.
The output capture added in 0.14.0 could stop console logging
altogether. start_console_logging() opened its sink before registering
the task callback, so a failure opening the sink aborted the function
and no commands were logged at all, which is worse than the gap it was
fixing. Opening the sink is now optional: on failure it degrades to
logging commands and their values, and says so.
Three further robustness fixes around the shared sink stack:
- execute_r unwound with a fallback that popped a sink when it had not
opened one, which could remove the console sink. It no longer pops
what it does not own.
- The console sink is restored if something else unwinds it, instead of
silently recording nothing from that point on.
- execute_r opens its sink with split = TRUE on top of the console sink,
so agent output cascaded into the console buffer and would have been
attributed to the user. That buffer is now discarded after each run.
Logged output lines carry a #> marker, and replay, past-history and
notebook export skip them so output is never re-run as code. The same
filters now also skip the console entry header, which they did not.
R CMD check: Status OK.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,8 @@ claudeAddin()
50
50
<details>
51
51
<summary><b>Recent Updates</b> (click to expand)</summary>
52
52
53
+
-**Logging fixes (R 0.14.1).** Two problems from a user report. Agent output was never written to the log, only the code, because the entry was written before the code ran; the log now records what each call printed. And the output capture added in 0.14.0 could stop console logging entirely: it opened its own output sink before registering the console callback, so if that sink could not be opened, nothing was logged at all. Opening it is now optional and failing back to logging commands and their values, the sink is restored if another execution unwinds it, and an agent run no longer pops a sink it did not open. Logged output lines are marked so that replay, history and notebook export skip them.
54
+
53
55
-**Console logging now captures output, not just results (R 0.14.0).** From follow-up on the logging request. The log recorded the value a command returned, so anything printed as a side effect was missing: `cat()`, progress output, and `print()` called inside a function. Running `f()` showed the call but not what `f()` printed, which is exactly the context an agent needs when you hand it an error you hit yourself. Standard output is now teed to the log and grouped under the command that produced it, alongside the warnings, messages, and errors already captured. Your console still shows everything as normal.
54
56
55
57
-**Windows session-liveness fix (R 0.13.2).** Checking whether a recorded R session was still alive used `tools::pskill(pid, signal = 0)`. That is the standard idiom on Unix, but on Windows `pskill` always calls `TerminateProcess` regardless of signal, so the check killed the session it was asking about, then reported it as alive and left the stale discovery file in place. Starting a server could therefore terminate another RStudio session and leave agents routed to a dead port. Liveness is now probed without signalling. Separately, registering a session whose name is already held by a different live session now warns instead of silently overwriting its discovery file, which had left agents holding the wrong port and token.
0 commit comments