Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): imported Claude threads show prompts, not Claude Code markup #33403

Mergeddominikzabcik(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/33403/headmerged by maria-rcks View on GitHub

Showing 3 changed files with 90 additions and 7 deletions (loading 2).

x
0 of 3 viewed, 3 left
90 additions and 7 deletionsapps/server/src/project/AgentSessionScanner.test.tsModified
View file
@@ -2675,15 +2675,25 @@
content: [{ type: "tool_result", tool_use_id: "toolu_1", content: "ok" }],
+ // Claude Code's own command output is not a message and must not take a history slot.
+ const commandOutput = record({
+ type: "user",
+ message: {
+ role: "user",
+ content: "<local-command-stdout>Compacted</local-command-stdout>",
+ },
+ });
yield* writeTranscript({
filePath: path.join(claudeHomePath, "projects", "-slug", "long-session.jsonl"),
contents: [
record({ type: "attachment", cwd: workspace, aiTitle: "Old title" }),
+ commandOutput,
record({ type: "user", message: { role: "user", content: "First prompt" } }),
record({
type: "assistant",
message: { role: "assistant", model: "claude-opus-5-5", content: "First reply" },
+ ...Array.from({ length: 200 }, () => commandOutput),
// Small tool records exceed the real 32 MiB selected-history budget in aggregate.
...Array.from({ length: 20_000 }, () => toolResult),
record({ type: "user", message: { role: "user", content: "Latest prompt" } }),
@@ -3283,6 +3293,20 @@
sessionId: "claude-session",
message: { role: "user", content: [{ type: "tool_result", text: "hidden" }] },