Claude session links miss sessions under an agent's own config directory, and a failed read looks like no sessions #740

Open
opened 2026-10-07 04:13:42 +00:00 by claude · 3 comments
Member

Found during IW-678 (Claude session links). Items:

  • ClaudeSessionsReader reads only the server's <CLAUDE_CONFIG_DIR>/sessions, so a Remote Control session started under another config directory (on this machine: the agents under ~/.claude while the server uses ~/.claude-iw) gets no Claude link on any page. LiveAgent.configDir makes the fix small: also read the sessions directories of the live agents' config directories.
  • The transcript fallback is skipped when one agent in a worktree has a config directory and another has none (unreadable environ), so the second agent's transcript is not read — AgentSessionService.scala configDirsFor uses the fallback only when the list is empty; review-phase-01-20261007-045846.md (architecture, error-handling).
  • A bad CLAUDE_CONFIG_DIR (server or agent) becomes None for transcripts with no message, and a failed /proc listing looks like "no agents" — ServerDaemon.scala claudeConfigDir.toOption, ClaudeConfigDir.ofEnviron, LiveAgentReader.agents getOrElse(Nil); review-phase-01-20261007-045846.md (error-handling).
Found during IW-678 (Claude session links). Items: - [ ] ClaudeSessionsReader reads only the server's `<CLAUDE_CONFIG_DIR>/sessions`, so a Remote Control session started under another config directory (on this machine: the agents under ~/.claude while the server uses ~/.claude-iw) gets no Claude link on any page. LiveAgent.configDir makes the fix small: also read the sessions directories of the live agents' config directories. - [ ] The transcript fallback is skipped when one agent in a worktree has a config directory and another has none (unreadable `environ`), so the second agent's transcript is not read — AgentSessionService.scala `configDirsFor` uses the fallback only when the list is empty; review-phase-01-20261007-045846.md (architecture, error-handling). - [ ] A bad `CLAUDE_CONFIG_DIR` (server or agent) becomes `None` for transcripts with no message, and a failed `/proc` listing looks like "no agents" — ServerDaemon.scala `claudeConfigDir.toOption`, ClaudeConfigDir.ofEnviron, LiveAgentReader.agents `getOrElse(Nil)`; review-phase-01-20261007-045846.md (error-handling).
Author
Member

Intake: agent-ready
Workflow: diagnostic
Reason: all gates passed
Analysis: project-management/issues/IW-740/analysis.md on branch IW-740

Intake: agent-ready Workflow: diagnostic Reason: all gates passed Analysis: project-management/issues/IW-740/analysis.md on branch IW-740
Author
Member

Implement: needs-human
Reason: batch-implement exit 1 — the kanon plugin's batch-implement command does not compile against the iw-cli core on this branch

The branch was merged with main at 33e14e5f before the run. Since #778–#780, main returns TrackerError from the tracker port's forge calls, and the installed kanon plugin (lib/batch/ForgeCatchUp.scala:143) still expects String. No phase ran, and no batch-implement.log was written. The cause is in the plugin, not in this issue: every batch-implement run in iw-cli fails the same way until the plugin follows the port change.

[error] /home/mph/.local/share/iw/plugins/kanon/lib/batch/ForgeCatchUp.scala:143:7
[error] Found:    Either[iw.core.model.TrackerError, Option[batch.ForgeState]]
[error] Required: Either[String, Option[batch.ForgeState]]
Compilation failed
Implement: needs-human Reason: batch-implement exit 1 — the kanon plugin's batch-implement command does not compile against the iw-cli core on this branch The branch was merged with `main` at 33e14e5f before the run. Since #778–#780, `main` returns `TrackerError` from the tracker port's forge calls, and the installed kanon plugin (`lib/batch/ForgeCatchUp.scala:143`) still expects `String`. No phase ran, and no `batch-implement.log` was written. The cause is in the plugin, not in this issue: every `batch-implement` run in iw-cli fails the same way until the plugin follows the port change. ``` [error] /home/mph/.local/share/iw/plugins/kanon/lib/batch/ForgeCatchUp.scala:143:7 [error] Found: Either[iw.core.model.TrackerError, Option[batch.ForgeState]] [error] Required: Either[String, Option[batch.ForgeState]] Compilation failed ```
Author
Member

Release: the implement loop failed this issue for a reason outside it. The kanon plugin did not compile against iw-cli main, because the tracker port now returns TrackerError (iw-cli #778). The plugin fix is dev-docs #484, and iw-cli 0.22.1 carries the core change. The issue goes back to the implement loop.

Release: the implement loop failed this issue for a reason outside it. The kanon plugin did not compile against iw-cli main, because the tracker port now returns TrackerError (iw-cli #778). The plugin fix is dev-docs #484, and iw-cli 0.22.1 carries the core change. The issue goes back to the implement loop.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#740
No description provided.