Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
pingdotgg
/
t3code
Pull requests
pingdotgg
t3code
Public
Synced with GitHub
Popular #1
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
CI
Agents
Settings
fix(server): settling a parent cancels its delegated child's armed usage-limit resume
#30175
Send to my agent
Open
juliusmarminge
wants to merge 9 commits into
main
from
refs/pull/30175/head
·
opened
4 weeks ago
View on GitHub
Conversation
10
Commits
9
Files changed
3
Impact
Showing
3 changed files
with
176 additions
and
8 deletions
.
x
0 of 3 viewed, 3 left
Files
Hide whitespace
Unified
Split
28 additions and 7 deletions
+28
-7
apps/server/src/orchestration-v2/Orchestrator.ts
Modified
Diff
Before/After
Viewed
apps/server/src/orchestration-v2/Orchestrator.ts
View file
Expand up
Show all 5,876 lines
@@ -5877,6 +5877,20 @@
5877
5877
const
failure =
latestRootProviderFailure
(run, projection.
turnItems
);
5878
5878
const
recovery = projection.
thread
.
limitRecovery
;
5879
5879
const
now =
yield
*
DateTime
.
now
;
5880
+
const
parentId =
5881
+
projection.
thread
.
lineage
.
relationshipToParent
===
"subagent"
5882
+
? projection.
thread
.
lineage
.
parentThreadId
5883
+
:
null
;
5884
+
// A subagent of a settled parent is abandoned work; resuming it would reopen the parent.
5885
+
const
parentSettled =
5886
+
parentId !==
null
&&
5887
+
(
yield
* projectionStore
5888
+
.
getThreadShell
(parentId)
5889
+
.
pipe
(
5890
+
Effect
.
mapError
(
5891
+
(cause) =>
new
OrchestratorProjectionError
({
threadId
: parentId, cause }),
5892
+
),
5893
+
))?.
settledOverride
===
"settled"
;
5880
5894
if
(
5881
5895
run?.
id
!== command.
usageLimitContinuationOfRunId
||
5882
5896
failure?.
class
!==
"usage_limit"
||
Show all 6 lines
@@ -5889,11 +5903,16 @@
5889
5903
projection.
thread
.
archivedAt
!==
null
||
5890
5904
projection.
thread
.
deletedAt
!==
null
||
5891
5905
projection.
thread
.
settledOverride
===
"settled"
||
5906
+
parentSettled ||
5892
5907
projection.
thread
.
providerInstanceId
!== run.
providerInstanceId
||
5893
5908
projection.
runtimeRequests
.
some
((request) => request.
status
===
"pending"
) ||
5894
5909
(projection.
thread
.
snoozedUntil
!=
null
&&
Home
Search
Explore
Menu